fix: dialyreport

This commit is contained in:
zhangsz
2025-03-27 10:27:31 +08:00
parent 26d005a5f6
commit a76e6170e2
2 changed files with 16 additions and 4 deletions

View File

@@ -640,7 +640,7 @@ int GetDailyReportByIndex(u_char oidLen,DWORD *oid,
PutLogFunID("GetDailyReportByIndex");
asnbuf = &asnbuf1;
AsnEncode(pdata,512,asnbuf);
AsnEncode(pdata,1024,asnbuf);//512
index = oid[14];
saveIndex = index %7;
@@ -905,10 +905,22 @@ int GetDailyReportByIndex(u_char oidLen,DWORD *oid,
int offset=86, tagPerCode=8, codeLen=0;
for (i=0; i<USSDCODE_MAX_CODE_NUM; i++)
{
if (i==0)
{
strcpy(shmp->ussdcode_report[i].code, USSDCODE_QUERY_CODE_STR);
}
else if (i==1)
{
strcpy(shmp->ussdcode_report[i].code, USSDCODE_TOPUP_CODE_STR);
}
else if (i==2)
{
strcpy(shmp->ussdcode_report[i].code, USSDCODE_HOTLINE_CODE_STR);
}
codeLen = strlen(shmp->ussdcode_report[i].code);
if (codeLen <= 0)
{
//continue;
strcpy(shmp->ussdcode_report[i].code, "---");//continue;
}
tag = offset + tagPerCode*i;
@@ -1223,7 +1235,7 @@ int pps_update_ussd_code_state(char *code, int type, int result, int dur)
shmp->req_count++;
break;
case USSDCODE_STAT_DUR:
shmp->req_duration += (dur / CYCLE_STATE_INTERVAL);
shmp->req_duration += (dur / CYCLE_STATE_INTERVAL) +1;
break;
case USSDCODE_STAT_ERR_TIMEOUT:
if (dur > 0)