xf.li | bfc6e71 | 2025-02-07 01:54:34 -0800 | [diff] [blame^] | 1 | |
| 2 | #include <limits.h>
|
| 3 | #include "sms_code.h"
|
| 4 | #include <sys/msg.h>
|
| 5 | T_zUfiSms_ConcatInfo g_zUfiSms_ConcatSms;T_zUfiSms_GroupInfo g_zUfiSms_GroupSms; |
| 6 | T_zUfiSms_DbStoreData g_zUfiSms_DbStoreData[ZTE_WMS_CONCAT_SMS_COUNT_MAX];UINT8 |
| 7 | g_zUfiSms_MemFullFlag[ZTE_WMS_MEMORY_MAX]={FALSE,FALSE};T_zUfiSms_DelSms |
| 8 | g_zUfiSms_DelMsg;T_zUfiSms_DelIndexInfo g_deleteIndex={(0x11ab+5072-0x257b)}; |
| 9 | T_zUfiSms_ModifySms g_zUfiSms_modifyMsg={(0x13a1+2914-0x1f03)}; |
| 10 | T_zUfiSms_ModifyIndexInfo g_modifyIndex={(0xb83+6302-0x2421)};int |
| 11 | g_zUfiSms_UnitLen=(0x1755+2050-0x1f57);int g_zUfiSms_ConcatTotalNum= |
| 12 | (0x114+3667-0xf67);int g_zUfiSms_CurConcatSegNo=(0x1494+4280-0x254c);UINT8 |
| 13 | g_zUfiSms_IsConcatSendSuc=TRUE;int g_zUfiSms_SendFailedCount=(0xdb0+4655-0x1fdf) |
| 14 | ;int g_zUfiSms_MsgRefer=(0xbe1+1037-0xfee);int g_zUfiSms_SendFailedRetry= |
| 15 | (0x2dc+5290-0x1786);char g_Zmena_value[(0xf5a+1876-0x16ac)]={(0xc87+4385-0x1da8) |
| 16 | };int g_displaymode=(0xf63+981-0x1338);extern SMS_LOCATION g_zUfiSms_CurLocation |
| 17 | ;extern T_zUfiSms_CmdStatus zUfiSms_HandleReport(unsigned char*ptPduData);extern |
| 18 | void zUfiSms_GetReportStatus(char*pdu_tmp,int*stat);extern VOID |
| 19 | zUfiSms_ResendAtCmdZmena(int cid);extern int zUfiSms_DecodeSmsData( |
| 20 | T_zUfiSms_DbStoreData*pDb_Data,int msg_index,zUfiSms_StoreType iStorePos, |
| 21 | T_SmsStatus bSms_Status,wms_message_format_enum_v01 format,long iPdu_Len, |
| 22 | unsigned char*pPdu_Received);typedef struct{long mtype;char mtext[ |
| 23 | (0xc44+918-0xfce)];}FOTA_MSG_BUF; |
| 24 | #define WEBUI_NOTIFY_PUSH_MSG_ (0x3e4+5049-0x179a)
|
| 25 | typedef struct{unsigned int isread_record;unsigned int inbox_full;} |
| 26 | T_zUfiMmi_SmsRecord;void zUfiMmi_SendSmsStatus(void){int iSmsNum= |
| 27 | (0x43d+5275-0x18d8);T_zUfiMmi_SmsRecord tRecord={(0x1e7+8202-0x21f1)};CHAR |
| 28 | smsNum[(0xe6+3806-0xf92)]={(0x1de5+2272-0x26c5)};sc_cfg_get(NV_SMS_IN_NUM,smsNum |
| 29 | ,sizeof(smsNum));iSmsNum=atoi(smsNum);tRecord.isread_record=zUfiSms_IsUnreadSms( |
| 30 | ZTE_WMS_MEMORY_MAX);if(iSmsNum>=ZSMS_NUM_MAX_CPE){tRecord.inbox_full= |
| 31 | (0x101b+2079-0x1839);}else{tRecord.inbox_full=(0xb43+1124-0xfa7);}}VOID |
| 32 | zUfiSms_Init(VOID){zUfiSms_CfgInit();zUfiSms_ChangeMainState(SMS_STATE_INITING); |
| 33 | }VOID zSvr_Zpbic_Sms_Init(VOID){int atRes=(0x1425+3977-0x23ae); |
| 34 | T_zUfiSms_StatusInfo tStatus={(0xb58+2689-0x15d9)};CHAR outDate[ |
| 35 | (0xe37+6067-0x25b8)]={(0x638+2049-0xe39)};zUfiSms_Init();zUfiSms_InitCmdStatus(& |
| 36 | tStatus,WMS_SMS_CMD_INIT);zSms_SendSmsInitReq();at_print(LOG_DEBUG, |
| 37 | "corem zSvr_Zpbic_Sms_Init has send init req\n");zSms_SendZmenaReq( |
| 38 | (0x8fc+7037-0x2479));at_print(LOG_DEBUG, |
| 39 | "\x63\x6f\x72\x65\x6d\x20\x7a\x53\x76\x72\x5f\x5a\x70\x62\x69\x63\x5f\x53\x6d\x73\x5f\x49\x6e\x69\x74\x20\x68\x61\x73\x20\x73\x65\x6e\x64\x20\x7a\x6d\x65\x6e\x61\x20\x72\x65\x71" "\n" |
| 40 | );sc_cfg_get(NV_OUTDATE_DELETE,outDate,sizeof(outDate));at_print(LOG_DEBUG, |
| 41 | "\x63\x6f\x72\x65\x6d\x20\x7a\x53\x76\x72\x5f\x5a\x70\x62\x69\x63\x5f\x53\x6d\x73\x5f\x49\x6e\x69\x74\x20\x6f\x75\x74\x64\x61\x74\x65\x20\x63\x68\x65\x63\x6b\x20\x25\x73" "\n" |
| 42 | ,outDate);if((0x488+714-0x752)==strcmp(outDate,"\x31")){atWeb_OutdateSmsCheck( |
| 43 | ZUFI_NULL);}}VOID zUfiSms_DeleteAllSimSms(VOID){zUfiSms_DeleteAllSimSmsInDb();} |
| 44 | #if (0xd69+3281-0x1a3a)
|
| 45 | VOID zUfiSms_ResendAtCmdZmena(int cid){CHAR netType[(0x14b4+2675-0x1ef5)]={ |
| 46 | (0x7b2+2096-0xfe2)};sc_cfg_get(NV_NETWORK_TYPE,netType,sizeof(netType));if(! |
| 47 | g_Zmena_rsp&&((0x1515+3-0x1518)!=strcmp( |
| 48 | "\x4e\x6f\x20\x53\x65\x72\x76\x69\x63\x65",netType)&&(0x1019+5417-0x2542)!= |
| 49 | strcmp("\x4c\x69\x6d\x69\x74\x65\x64\x20\x53\x65\x72\x76\x69\x63\x65",netType))) |
| 50 | {atUnsoli_Report_Zmena(NULL,cid);}} |
| 51 | #endif
|
| 52 | void zUfiSms_Ack_new_msg(BOOL needAck){ |
| 53 | #if (0x13f7+3455-0x2176)
|
| 54 | CHAR ackPduStr[(0x15e0+691-0x1703)]={(0x1c4+8832-0x2444)};SMS_PARAM reportParam= |
| 55 | {(0x1aac+1494-0x2082)};int total_length=(0x6dc+147-0x76f);UINT8 TP_FCS= |
| 56 | (0x2f5+8132-0x22b9);CHAR strValue[(0x10af+3716-0x1f31)]={(0x12a5+782-0x15b3)};if |
| 57 | (needAck){TP_FCS=(0x1021+3013-0x1be6);sprintf(strValue,"\x25\x64", |
| 58 | (0xdda+1677-0x1466));}else{TP_FCS=(0x1a8+8976-0x23e5);sprintf(strValue, |
| 59 | "\x25\x64",(0x1c31+584-0x1e77));}sprintf(reportParam.SCA,"\x25\x73",cfg_get( |
| 60 | "\x73\x6d\x73\x5f\x63\x65\x6e\x74\x65\x72\x5f\x6e\x75\x6d"));total_length= |
| 61 | zUfiSms_EncodePdu_DeliverReport(&reportParam,ackPduStr,TP_FCS);memset(& |
| 62 | g_zUfiSms_ackPdu,(0xdaf+5972-0x2503),sizeof(g_zUfiSms_ackPdu));g_zUfiSms_ackPdu. |
| 63 | length=String2Bytes(ackPduStr,g_zUfiSms_ackPdu.pdu,strlen(ackPduStr));memset( |
| 64 | g_zUfiSms_ackPdu.pdu,(0x90d+2911-0x146c),sizeof(g_zUfiSms_ackPdu.pdu));memcpy(& |
| 65 | g_zUfiSms_ackPdu.pdu,&ackPduStr,sizeof(ackPduStr));atBase_SendMsgToSelf( |
| 66 | ZAT_CNMA_CMD,strValue,sizeof(strValue)); |
| 67 | #endif
|
| 68 | #if (0x72a+5465-0x1c83) |
| 69 | CHAR strValue[(0xe55+4258-0x1ef5)]={(0x1132+167-0x11d9)};if(needAck){snprintf( |
| 70 | strValue,sizeof(strValue),"\x25\x64",(0x1276+2761-0x1d3e));}else{snprintf( |
| 71 | strValue,sizeof(strValue),"\x25\x64",(0x15c8+1400-0x1b3e));}zSvr_InnerSendMsg( |
| 72 | ZUFI_MODULE_ID_AT_LOCAL,ZUFI_MODULE_ID_AT_UNSOLI,MSG_CMD_AT_CNMA,strlen(strValue |
| 73 | ),strValue); |
| 74 | #endif
|
| 75 | if(needAck){zSms_SendCnmaReq((0x1136+5367-0x262c));}else{zSms_SendCnmaReq( |
| 76 | (0xd58+317-0xe93));}}T_zUfiSms_CmdStatus zUfiSms_SendRawSms(T_zUfiSms_SendReq* |
| 77 | ptSendMsg){if(NULL==ptSendMsg||(0x57a+6022-0x1d00)==ptSendMsg->receiver_count){ |
| 78 | return WMS_CMD_FAILED;}at_print(LOG_DEBUG, |
| 79 | "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x6e\x64\x52\x61\x77\x53\x6d\x73\x20\x72\x65\x63\x65\x69\x76\x65\x72\x5f\x63\x6f\x75\x6e\x74\x3a\x25\x64\x2f\x64\x65\x73\x74\x5f\x6e\x75\x6d\x3a\x25\x73\x2f\x6d\x73\x67\x5f\x6c\x65\x6e\x3a\x25\x64\x2f\x69\x64\x3a\x25\x64\x2e" "\n" |
| 80 | ,ptSendMsg->receiver_count,ptSendMsg->dest_num[(0xe43+5767-0x24ca)],ptSendMsg-> |
| 81 | msg_len,ptSendMsg->id); |
| 82 | #if (0xe94+287-0xfb2) |
| 83 | at_print(LOG_DEBUG, |
| 84 | "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x6e\x64\x52\x61\x77\x53\x6d\x73\x20\x64\x63\x73\x3a\x25\x64" "\n" |
| 85 | ,ptSendMsg->dcs); |
| 86 | #endif
|
| 87 | sc_cfg_set(NV_SMS_SEND_RESULT,"");g_zUfiSms_SendFailedCount=(0x6ad+3566-0x149b); |
| 88 | if(ptSendMsg->isDelete==TRUE||-(0x1379+2062-0x1b86)!=ptSendMsg->id){(void) |
| 89 | zUfiSms_DeleteDraftSms(ptSendMsg->id);}zUfiSms_SetGlobalDcsLang(ptSendMsg->dcs); |
| 90 | memset(&g_zUfiSms_GroupSms,(0xa63+4849-0x1d54),sizeof(g_zUfiSms_GroupSms));if( |
| 91 | ZUFI_FAIL==zUfiSms_FillGroupSms(ptSendMsg,&g_zUfiSms_GroupSms)){return |
| 92 | WMS_CMD_FAILED;}memset(&g_zUfiSms_ConcatSms,(0x50+3418-0xdaa),sizeof( |
| 93 | g_zUfiSms_ConcatSms));g_zUfiSms_UnitLen=zUfiSms_FillConcatSms(ptSendMsg,& |
| 94 | g_zUfiSms_ConcatSms);g_zUfiSms_IsConcatSendSuc=TRUE;g_zUfiSms_CurConcatSegNo= |
| 95 | (0x11ec+683-0x1497);memset(g_zUfiSms_DbStoreData,(0xff+6232-0x1957),sizeof( |
| 96 | g_zUfiSms_DbStoreData));if(ptSendMsg->mem_store==(0x4fb+2182-0xd77)){ |
| 97 | g_displaymode=(0x852+6110-0x202f);at_print(LOG_DEBUG, |
| 98 | "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x6e\x64\x53\x6d\x73\x3a\x20\x6d\x73\x67\x5f\x64\x69\x73\x70\x6c\x61\x79\x6d\x6f\x64\x65\x20\x3d\x20\x31" "\n" |
| 99 | );}else{g_displaymode=(0x40d+1942-0xba3);at_print(LOG_DEBUG, |
| 100 | "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x6e\x64\x53\x6d\x73\x3a\x20\x6d\x73\x67\x5f\x64\x69\x73\x70\x6c\x61\x79\x6d\x6f\x64\x65\x20\x3d\x20\x30" "\n" |
| 101 | );}return zUfiSms_SendSms();}T_zUfiSms_CmdStatus zUfiSms_WriteRawSms( |
| 102 | T_zUfiSms_SaveReq*pSaveBuff){T_zUfiSms_ConcatInfo tConcatSms;T_zUfiSms_GroupInfo |
| 103 | tGroupSms;int iSmsLen=(0x742+2786-0x1224);T_zUfiSms_CmdStatus result= |
| 104 | WMS_CMD_SUCCESS;if(NULL==pSaveBuff){return WMS_CMD_FAILED;}if( |
| 105 | g_zUfiSms_MemFullFlag[ZTE_WMS_MEMORY_NV]){at_print(LOG_DEBUG, |
| 106 | "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x57\x72\x69\x74\x65\x52\x61\x77\x53\x6d\x73\x20\x6e\x76\x20\x6d\x65\x6d\x6f\x72\x79\x20\x69\x73\x20\x66\x75\x6c\x6c\x2c\x72\x65\x74\x75\x72\x6e" "\n" |
| 107 | );return WMS_CMD_FAILED;}if(pSaveBuff->isDelete==TRUE){(void) |
| 108 | zUfiSms_DeleteDraftSms(pSaveBuff->id);}zUfiSms_SetGlobalDcsLang(pSaveBuff->dcs); |
| 109 | memset(&tConcatSms,(0x1c6+351-0x325),sizeof(T_zUfiSms_ConcatInfo));memset(& |
| 110 | tGroupSms,(0x764+922-0xafe),sizeof(T_zUfiSms_GroupInfo));(void) |
| 111 | zUfiSms_FillGroupSms(pSaveBuff,&tGroupSms);iSmsLen=zUfiSms_FillConcatSms( |
| 112 | pSaveBuff,&tConcatSms);at_print(LOG_DEBUG, |
| 113 | "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x57\x72\x69\x74\x65\x52\x61\x77\x53\x6d\x73\x20\x74\x6f\x74\x61\x6c\x5f\x72\x65\x63\x65\x69\x76\x65\x72\x3d\x25\x64\x2c\x69\x53\x6d\x73\x4c\x65\x6e\x3d\x25\x64" "\n" |
| 114 | ,tGroupSms.total_receiver,iSmsLen);for(tGroupSms.current_receiver= |
| 115 | (0x1960+1255-0x1e47);tGroupSms.current_receiver<tGroupSms.total_receiver; |
| 116 | tGroupSms.current_receiver++){tConcatSms.current_sending=(0xd41+1574-0x1367); |
| 117 | result=zUfiSms_SaveSmsToDb(pSaveBuff,&tConcatSms,&tGroupSms,iSmsLen);at_print( |
| 118 | LOG_DEBUG, |
| 119 | "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x57\x72\x69\x74\x65\x52\x61\x77\x53\x6d\x73\x20\x63\x75\x72\x72\x65\x6e\x74\x5f\x72\x65\x63\x65\x69\x76\x65\x72\x3d\x25\x64\x2c\x72\x65\x73\x75\x6c\x74\x3d\x25\x64" "\n" |
| 120 | ,tGroupSms.current_receiver,result);}sc_cfg_set(NV_SMS_DB_CHANGE,"\x31"); |
| 121 | zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);if(g_zUfiSms_MemFullFlag[ |
| 122 | WMS_STORAGE_TYPE_NV_V01]){zUfiSms_SendSmsStatusInfo(MSG_SMS_DEFAULT);}at_print( |
| 123 | LOG_DEBUG, |
| 124 | "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x57\x72\x69\x74\x65\x52\x61\x77\x53\x6d\x73\x20\x65\x6e\x64\x20\x61\x6e\x64\x20\x72\x65\x73\x75\x6c\x74\x3d\x25\x64" "\n" |
| 125 | ,result);return result;}T_zUfiSms_CmdStatus zUfiSms_DeleteSms(T_zUfiSms_DelReq* |
| 126 | ptDelBuff){T_zUfiSms_CmdStatus result=WMS_CMD_SUCCESS;BOOL |
| 127 | memoryFullbeforeDelete=FALSE;BOOL unreadBeforeDelete=FALSE;if(NULL==ptDelBuff){ |
| 128 | return WMS_CMD_FAILED;}at_print(LOG_DEBUG, |
| 129 | "\x5b\x53\x4d\x53\x5d\x20\x21\x21\x21\x21\x21\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x53\x6d\x73\x21\x21\x63\x6f\x75\x6e\x74\x3a\x25\x64\x2f\x69\x64\x5b\x25\x64\x5d\x2e" "\n" |
| 130 | ,ptDelBuff->all_or_count,ptDelBuff->id[(0x114b+3604-0x1f5f)]);(void) |
| 131 | zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);zUfiSms_ChangeMainState( |
| 132 | SMS_STATE_DELING);memset(&g_zUfiSms_DelMsg,(0x1c66+202-0x1d30),sizeof( |
| 133 | T_zUfiSms_DelSms));if(ZUFI_FAIL==zUfiSms_SetDeleteInfo(ptDelBuff)){at_print( |
| 134 | LOG_DEBUG, |
| 135 | "\x5b\x53\x4d\x53\x5d\x20\x21\x21\x21\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x74\x44\x65\x6c\x65\x74\x65\x49\x6e\x66\x6f\x20\x66\x61\x69\x6c\x2e" "\n" |
| 136 | );zUfiSms_ChangeMainState(SMS_STATE_DELED);return WMS_CMD_FAILED;}at_print( |
| 137 | LOG_DEBUG, |
| 138 | "\x5b\x53\x4d\x53\x5d\x20\x21\x21\x21\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x74\x44\x65\x6c\x65\x74\x65\x49\x6e\x66\x6f\x20\x52\x65\x61\x64\x20\x74\x6f\x20\x44\x65\x6c\x65\x74\x65\x3a\x6e\x76\x5f\x63\x6f\x75\x6e\x74\x3a\x25\x64\x2f\x73\x69\x6d\x5f\x63\x6f\x75\x6e\x74\x3a\x25\x64\x2e" "\n" |
| 139 | ,g_zUfiSms_DelMsg.nv_count,g_zUfiSms_DelMsg.sim_count);if((0x980+2743-0x1437)< |
| 140 | g_zUfiSms_DelMsg.nv_count){if(g_zUfiSms_MemFullFlag[WMS_STORAGE_TYPE_NV_V01]){ |
| 141 | memoryFullbeforeDelete=TRUE;}unreadBeforeDelete=zUfiSms_IsUnreadSms( |
| 142 | ZTE_WMS_MEMORY_NV);result=(T_zUfiSms_CmdStatus)zUfiSms_DeleteNvSms();(void) |
| 143 | zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);zUfiSms_ChangeMainState( |
| 144 | SMS_STATE_DELED);sc_cfg_set(NV_SMS_DB_CHANGE,"\x31");at_print(LOG_DEBUG, |
| 145 | "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x4e\x76\x53\x6d\x73\x20\x6d\x65\x6d\x6f\x72\x79\x46\x75\x6c\x6c\x62\x65\x66\x6f\x72\x65\x44\x65\x6c\x65\x74\x65\x3d\x25\x64\x2c\x4d\x65\x6d\x46\x75\x6c\x6c\x46\x6c\x61\x67\x28\x4e\x56\x29\x3d\x25\x64" "\n" |
| 146 | ,memoryFullbeforeDelete,g_zUfiSms_MemFullFlag[WMS_STORAGE_TYPE_NV_V01]);if( |
| 147 | memoryFullbeforeDelete&&!g_zUfiSms_MemFullFlag[WMS_STORAGE_TYPE_NV_V01]){ |
| 148 | at_print(LOG_DEBUG, |
| 149 | "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x4e\x76\x53\x6d\x73\x3a\x20\x73\x65\x6e\x64\x20\x41\x54\x2b\x5a\x4d\x45\x4e\x41\x3d\x30" "\n" |
| 150 | );zSms_SendZmenaReq((0xd95+2081-0x15b6));}if(memoryFullbeforeDelete&&! |
| 151 | g_zUfiSms_MemFullFlag[WMS_STORAGE_TYPE_NV_V01]||unreadBeforeDelete&&! |
| 152 | zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){zUfiSms_SendSmsStatusInfo( |
| 153 | MSG_SMS_DEFAULT);}}if((0x391+5270-0x1827)<g_zUfiSms_DelMsg.sim_count){result= |
| 154 | zUfiSms_DeleteSimSms();(void)zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_SIM);} |
| 155 | at_print(LOG_DEBUG, |
| 156 | "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x53\x6d\x73\x20\x72\x65\x73\x75\x6c\x74\x3d\x25\x64" "\n" |
| 157 | ,result);return result;}T_zUfiSms_CmdStatus zUfiSms_ModifySmsTag( |
| 158 | T_zUfiSms_ModifyFlag*ptModifyBuff){unsigned long i=(0x67d+78-0x6cb); |
| 159 | T_zUfiSms_CmdStatus result=WMS_CMD_SUCCESS;char acStorePos[(0xa4b+2857-0x1542)]= |
| 160 | {(0x6ca+3788-0x1596)};if(NULL==ptModifyBuff){at_print(LOG_ERR, |
| 161 | "\x69\x6e\x70\x75\x74\x73\x20\x69\x73\x20\x6e\x75\x6c\x6c\x2e");return |
| 162 | WMS_CMD_FAILED;}for(i=(0x2db+3157-0xf30);i<ptModifyBuff->total_id;i++){if( |
| 163 | ptModifyBuff->id[i]<(0xcfa+5204-0x214d)||ZUFI_FAIL==zUfiSms_UpdateSmsTagInDb( |
| 164 | ptModifyBuff->id[i],ptModifyBuff->tags)){result=WMS_CMD_FAILED;}else{result= |
| 165 | WMS_CMD_SUCCESS;}}if(ZUFI_FAIL==zUfiSms_GetStorePosById( |
| 166 | "\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65",acStorePos,sizeof(acStorePos), |
| 167 | ptModifyBuff->id[(0x1b6+2999-0xd6d)])){return ZUFI_FAIL;}if((0x18ec+1375-0x1e4b) |
| 168 | ==strcmp(acStorePos,ZTE_WMS_DB_NV_TABLE)){zUfiSms_SendSmsStatusInfo( |
| 169 | MSG_SMS_READING);}if((0xae9+3027-0x16bc)==strcmp(acStorePos,ZTE_WMS_DB_SIM_TABLE |
| 170 | )&&ptModifyBuff->total_id>(0x594+4811-0x185f)){zUfiSms_ModifyModemSms( |
| 171 | ptModifyBuff);}return result;}T_zUfiSms_CmdStatus zUfiSms_SetSmsPara( |
| 172 | T_zUfiSms_ParaInfo*ptParaBuff){int atRes=(0xe21+2138-0x167b);CHAR sca[ |
| 173 | ZTE_WMS_ADDRESS_DIGIT_MAX_V01+(0x1283+3113-0x1eab)]={(0x93d+4710-0x1ba3)};CHAR |
| 174 | store[(0x9f2+2095-0x120d)]={(0x14a+1509-0x72f)};CHAR defaultStore[ |
| 175 | (0x217+4442-0x133f)]={(0xbb+7806-0x1f39)};if(ptParaBuff==ZUFI_NULL){return |
| 176 | WMS_CMD_FAILED;}if(strlen(ptParaBuff->sca)!=(0x1260+2650-0x1cba)){strncpy(sca, |
| 177 | ptParaBuff->sca,sizeof(sca)-(0x6bc+1352-0xc03));at_print(LOG_DEBUG, |
| 178 | "\x73\x65\x6e\x64\x20\x5a\x41\x54\x5f\x43\x53\x43\x41\x5f\x53\x45\x54\x5f\x43\x4d\x44\x20\x6d\x65\x73\x73\x61\x67\x65\x20\x63\x73\x63\x61\x20\x69\x73\x20\x25\x73\x2e" "\n" |
| 179 | ,sca);atRes=zSms_SetCscaReq(ptParaBuff->sca);if(atRes!=ZSMS_RESULT_OK){return |
| 180 | WMS_CMD_FAILED;}}sc_cfg_get(NV_DEFAULT_STORE,defaultStore,sizeof(defaultStore)); |
| 181 | if((*(ptParaBuff->default_store)!='\0')&&((0x3c+2694-0xac2)!=strcmp(defaultStore |
| 182 | ,ptParaBuff->default_store))){{strncpy(store,ptParaBuff->default_store,sizeof( |
| 183 | store)-(0x884+5123-0x1c86));}atRes=zSms_SendCnmiReq(store);if(atRes!= |
| 184 | ZSMS_RESULT_OK){return WMS_CMD_FAILED;}}if(-(0x846+6859-0x2310)== |
| 185 | zUfiSms_SetDbParameters(ptParaBuff)){at_print(LOG_ERR, |
| 186 | "\x73\x65\x74\x20\x70\x61\x72\x61\x6d\x65\x74\x65\x72\x73\x20\x74\x6f\x20\x74\x61\x62\x6c\x65\x20\x66\x61\x69\x6c\x65\x64\x2e" |
| 187 | );return WMS_CMD_FAILED;}return WMS_CMD_SUCCESS;}void zUfiSms_CmgrNvSet(void){ |
| 188 | char sms_rec_flag[(0x16d+1853-0x8a5)]={(0x897+3326-0x1595)};char remind_flag[ |
| 189 | (0xbe3+1705-0x1287)];int sms_count=(0x88b+3327-0x158a);int remind_count= |
| 190 | (0xa91+674-0xd33);memset(sms_rec_flag,(0x1171+425-0x131a),sizeof(sms_rec_flag)); |
| 191 | sc_cfg_get(ZTE_WMS_NVCONFIG_RECEVIED,sms_rec_flag,sizeof(sms_rec_flag)); |
| 192 | sms_count=atoi(sms_rec_flag);if(sms_count<(0x3d7+5576-0x199f)||sms_count>INT_MAX |
| 193 | -(0xe8a+1188-0x132d)){at_print(LOG_ERR, |
| 194 | "\x5b\x53\x4d\x53\x5d\x73\x6d\x73\x5f\x63\x6f\x75\x6e\x74\x20\x65\x72\x72\x3a\x25\x64" "\n" |
| 195 | ,sms_count);return;}memset(sms_rec_flag,(0x987+2733-0x1434),sizeof(sms_rec_flag) |
| 196 | );snprintf(sms_rec_flag,sizeof(sms_rec_flag),"\x25\x64",sms_count+ |
| 197 | (0x93d+5305-0x1df5));sc_cfg_set(ZTE_WMS_NVCONFIG_RECEVIED,sms_rec_flag); |
| 198 | sc_cfg_set(ZTE_WMS_NVCONFIG_RECEVIED_LED,sms_rec_flag);memset(remind_flag, |
| 199 | (0x1003+3708-0x1e7f),sizeof(remind_flag));snprintf(remind_flag,sizeof( |
| 200 | remind_flag),"\x25\x64",remind_count+(0x38+9457-0x2528));sc_cfg_set( |
| 201 | ZTE_WMS_NVCONFIG_RECEVIED_REMIND,remind_flag);sc_cfg_set(NV_SMS_RECV_RESULT, |
| 202 | "\x6f\x6b");sc_cfg_set(NV_SMS_DB_CHANGE,"\x31");}void zUfiSms_CdsRespProc( |
| 203 | T_zSms_SmsInd*ptRespData){unsigned char acFormatPdu[ZSMS_PDU_SIZE]={ |
| 204 | (0x9ea+4102-0x19f0)};T_zUfiSms_DbStoreData tDbStoreData={(0xe76+2412-0x17e2)}; |
| 205 | int isPushSms=(0x381+247-0x478);if(strcmp(ptRespData->pdu,"")== |
| 206 | (0x1052+195-0x1115)){CHAR srState[(0xac9+1469-0x1054)]={(0x1c56+180-0x1d0a)}; |
| 207 | sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if((0x82f+5473-0x1d90)!=strcmp( |
| 208 | srState,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x69\x6e\x67")){sc_cfg_set( |
| 209 | NV_SMS_RECV_RESULT,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(SMS_STATE_RECVED) |
| 210 | ;}else{sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");} |
| 211 | return;}zUfiSms_GetReportStatus(ptRespData->pdu,&ptRespData->stat);(void) |
| 212 | String2Bytes(ptRespData->pdu,acFormatPdu,(int)strlen(ptRespData->pdu));if( |
| 213 | (0xce3+2467-0x1681)==ptRespData->stat){(void)zUfiSms_HandleReport(acFormatPdu); |
| 214 | sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64"); |
| 215 | zUfiSms_Ack_new_msg(TRUE);return;}return;}int zUfiSms_CheckIfWholeSms( |
| 216 | T_zUfiSms_DbStoreData*data,SMS_MSG_INFO*pmsg){if(data->concat_sms!= |
| 217 | (0x617+4819-0x18e9)){return(0x3ac+8367-0x245b);}zUfiSms_GetCurrentRecvTotalSeq( |
| 218 | data,pmsg);at_print(LOG_DEBUG, |
| 219 | "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x68\x65\x63\x6b\x49\x66\x57\x68\x6f\x6c\x65\x53\x6d\x73\x20\x69\x64\x20\x3d\x20\x25\x73\x2c\x20\x74\x6f\x74\x61\x6c\x53\x65\x71\x20\x3d\x20\x25\x64\x2c\x72\x65\x66\x20\x3d\x25\x64\x2c\x74\x6f\x74\x61\x6c\x20\x3d\x25\x64\x2c\x20\x73\x65\x71\x3d\x25\x64" "\n" |
| 220 | ,pmsg->id,atoi(pmsg->total_seq),data->concat_info[(0x147+7478-0x1e7d)],data-> |
| 221 | concat_info[(0xad8+5057-0x1e98)],data->concat_info[(0x7c6+2218-0x106e)]);if(data |
| 222 | ->concat_info[(0x5d5+1524-0xbc8)]==atoi(pmsg->total_seq)){return |
| 223 | (0x685+4804-0x1949);}return-(0x5b3+8404-0x2686);}void |
| 224 | zUfiSms_TrafficChangeSmsTag(T_zUfiSms_DbStoreData*data){CHAR smsNumber[ |
| 225 | (0x672+7618-0x2402)]={(0x15f0+3582-0x23ee)};sc_cfg_get(NV_TRAFFIC_SMS_NUMBER, |
| 226 | smsNumber,sizeof(smsNumber));if((0xaa4+35-0xac7)==strcmp(smsNumber,data->number) |
| 227 | ){data->tag=WMS_TAG_TYPE_MT_READ_V01;data->msg_displaymode=(0x114f+5388-0x265a); |
| 228 | }}void zUfiSms_HandleTrafficSms(T_zUfiSms_DbStoreData*data){int iSmsId= |
| 229 | (0x1257+4896-0x2577);SMS_MSG_INFO msg={(0xa77+520-0xc7f)};CHAR smsNumber[ |
| 230 | (0x55f+4296-0x15f5)]={(0xb36+726-0xe0c)};sc_cfg_get(NV_TRAFFIC_SMS_NUMBER, |
| 231 | smsNumber,sizeof(smsNumber));at_print(LOG_DEBUG, |
| 232 | "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x20\x74\x44\x62\x53\x74\x6f\x72\x65\x44\x61\x74\x61\x2e\x6e\x75\x6d\x62\x65\x72\x20\x3d\x20\x25\x73\x2c\x20\x74\x72\x61\x66\x66\x69\x63\x5f\x73\x6d\x73\x5f\x6e\x75\x6d\x62\x65\x72\x20\x3d\x20\x25\x73" "\n" |
| 233 | ,data->number,smsNumber);if((0x4e3+3708-0x135f)==strcmp(smsNumber,data->number)) |
| 234 | {if((0xa9a+6219-0x22e5)!=zUfiSms_CheckIfWholeSms(data,&msg)){at_print(LOG_DEBUG, |
| 235 | "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x20\x63\x6d\x74\x20\x69\x6e\x64\x2c\x20\x72\x65\x63\x76\x20\x73\x6d\x73\x2c\x20\x62\x75\x74\x20\x6e\x6f\x74\x20\x77\x68\x6f\x6c\x65\x20\x73\x6d\x73\x2c\x20\x77\x61\x69\x74\x20\x74\x6f\x20\x72\x65\x63\x76\x20\x6e\x65\x78\x74\x20\x73\x65\x67" "\n" |
| 236 | );return;}sc_cfg_set(NV_TRAFFIC_RECV_SMS_ID,msg.id);sc_cfg_set( |
| 237 | NV_TRAFFIC_SMS_NUMBER,"\x30");at_print(LOG_DEBUG, |
| 238 | "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x48\x61\x6e\x64\x6c\x65\x54\x72\x61\x66\x66\x69\x63\x53\x6d\x73\x20\x20\x20\x74\x72\x61\x66\x66\x69\x63\x5f\x72\x65\x63\x76\x5f\x73\x6d\x73\x5f\x69\x64\x20\x3d\x20\x25\x73" "\n" |
| 239 | ,msg.id);}}void zUfiSms_CmtRespProc(T_zSms_SmsInd*ptRespData){zUfiSms_StoreType |
| 240 | iStorePos=WMS_STORAGE_TYPE_NV_V01;unsigned char acFormatPdu[ZSMS_PDU_SIZE]={ |
| 241 | (0xeef+2228-0x17a3)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms= |
| 242 | (0x1781+1027-0x1b84);SMS_PARAM one_sms={(0x176b+2186-0x1ff5)};int |
| 243 | unread_sms_before_recv_new_sms=(0x8ab+123-0x926);memset(&tDbStoreData, |
| 244 | (0x1497+3887-0x23c6),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG, |
| 245 | "\x5b\x53\x4d\x53\x5d\x20\x45\x6e\x74\x65\x72\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x21\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2f\x73\x74\x61\x74\x3a\x25\x64\x2f\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2f\x70\x64\x75\x3a\x25\x73\x21" "\n" |
| 246 | ,ptRespData->index,ptRespData->stat,ptRespData->length,ptRespData->pdu);if( |
| 247 | strcmp(ptRespData->pdu,"")==(0x48a+576-0x6ca)){CHAR srState[(0x358+391-0x4ad)]={ |
| 248 | (0xa85+1245-0xf62)};sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if( |
| 249 | (0x1667+1461-0x1c1c)!=strcmp(srState, |
| 250 | "\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x69\x6e\x67")){sc_cfg_set( |
| 251 | NV_SMS_RECV_RESULT,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(SMS_STATE_RECVED) |
| 252 | ;}else{sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");} |
| 253 | return;}isPushSms=DecodePushPdu(ptRespData->pdu,&one_sms);at_print(LOG_DEBUG, |
| 254 | "\x5b\x73\x6d\x73\x5d\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x20\x69\x73\x50\x75\x73\x68\x53\x6d\x73\x20\x3d\x20\x25\x64" "\n" |
| 255 | ,isPushSms);if(SMS_NOTIFICATION==isPushSms){BakNotificationSms(one_sms.TP_UD, |
| 256 | strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0x2413+502-0x2609));}if( |
| 257 | SMS_NO_PUSH!=isPushSms){at_print(LOG_DEBUG, |
| 258 | "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x69\x6e\x64\x65\x78\x20\x3d\x20\x25\x64" "\n" |
| 259 | ,one_sms.index);at_print(LOG_DEBUG, |
| 260 | "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x54\x50\x5f\x52\x65\x66\x65\x72\x4e\x75\x6d\x20\x3d\x20\x25\x64" "\n" |
| 261 | ,one_sms.TP_ReferNum);at_print(LOG_DEBUG, |
| 262 | "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x54\x50\x5f\x41\x6c\x6c\x50\x69\x65\x63\x65\x4e\x75\x6d\x20\x3d\x20\x25\x64" "\n" |
| 263 | ,one_sms.TP_AllPieceNum);at_print(LOG_DEBUG, |
| 264 | "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x54\x50\x5f\x43\x75\x72\x72\x65\x6e\x74\x50\x69\x65\x63\x65\x4e\x75\x6d\x20\x3d\x20\x25\x64" "\n" |
| 265 | ,one_sms.TP_CurrentPieceNum);zUfiSms_ChangeMainState(SMS_STATE_RECVED); |
| 266 | zUfiSms_Ack_new_msg(TRUE);return;}zUfiSms_GetReportStatus(ptRespData->pdu,& |
| 267 | ptRespData->stat);(void)String2Bytes(ptRespData->pdu,acFormatPdu,(int)strlen( |
| 268 | ptRespData->pdu));if((0xfd9+1406-0x1552)==ptRespData->stat){(void) |
| 269 | zUfiSms_HandleReport(acFormatPdu);sc_cfg_set(NV_SR_STATE, |
| 270 | "\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");zUfiSms_Ack_new_msg(TRUE);return |
| 271 | ;}(void)zUfiSms_DecodeSmsData(&tDbStoreData,ptRespData->index,iStorePos,( |
| 272 | T_SmsStatus)ptRespData->stat,WMS_MESSAGE_FORMAT_GW_PP_V01,ptRespData->length, |
| 273 | acFormatPdu);if(tDbStoreData.sms_class==WMS_MESSAGE_CLASS_2){iStorePos= |
| 274 | WMS_STORAGE_TYPE_UIM_V01;}if(zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){ |
| 275 | unread_sms_before_recv_new_sms=(0x131d+1448-0x18c4);}else{ |
| 276 | unread_sms_before_recv_new_sms=(0x39c+2825-0xea5);}zUfiSms_TrafficChangeSmsTag(& |
| 277 | tDbStoreData);if(ZTE_WMS_NV_MEMORY_FULL==zUfiSms_WriteSmsToDb(&tDbStoreData, |
| 278 | iStorePos,-(0x1a58+1345-0x1f98))){zUfiSms_Ack_new_msg(FALSE);zSms_SendZmenaReq( |
| 279 | (0x16f4+787-0x1a06));return;}if(tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){ |
| 280 | zUfiSms_Ack_new_msg(TRUE);}zUfiSms_CmgrNvSet();zUfiSms_CheckMemoryFull( |
| 281 | ZTE_WMS_MEMORY_NV);zUfiSms_ChangeMainState(SMS_STATE_RECVED); |
| 282 | zUfiSms_SendSmsStatusInfo(MSG_SMS_NEW);zUfiSms_HandleTrafficSms(&tDbStoreData); |
| 283 | return;}void zUfiSms_ZmgrRespProc(T_zSms_SmsInd*ptRespData){zUfiSms_StoreType |
| 284 | iStorePos=WMS_STORAGE_TYPE_NV_V01;unsigned char acFormatPdu[ZSMS_PDU_SIZE]={ |
| 285 | (0x19b6+1348-0x1efa)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms= |
| 286 | (0x2f9+4293-0x13be);SMS_PARAM one_sms={(0xb03+5728-0x2163)};CHAR defaultStore[ |
| 287 | (0x1154+5303-0x25d9)]={(0x1c2+572-0x3fe)};memset(&tDbStoreData, |
| 288 | (0x3bd+4483-0x1540),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG, |
| 289 | "\x5b\x53\x4d\x53\x5d\x20\x45\x6e\x74\x65\x72\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x21\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2f\x73\x74\x61\x74\x3a\x25\x64\x2f\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2f\x70\x64\x75\x3a\x25\x73\x21" "\n" |
| 290 | ,ptRespData->index,ptRespData->stat,ptRespData->length,ptRespData->pdu);if( |
| 291 | strcmp(ptRespData->pdu,"")==(0xa8b+6603-0x2456)){CHAR srState[ |
| 292 | (0x16ac+918-0x1a10)]={(0x607+2098-0xe39)};sc_cfg_get(NV_SR_STATE,srState,sizeof( |
| 293 | srState));if((0xdb4+4069-0x1d99)!=strcmp(srState, |
| 294 | "\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x69\x6e\x67")){sc_cfg_set( |
| 295 | NV_SMS_RECV_RESULT,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(SMS_STATE_RECVED) |
| 296 | ;}else{sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");} |
| 297 | return;}isPushSms=DecodePushPdu(ptRespData->pdu,&one_sms);at_print(LOG_DEBUG, |
| 298 | "\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x20\x69\x73\x50\x75\x73\x68\x53\x6d\x73\x20\x3d\x20\x25\x64" "\n" |
| 299 | ,isPushSms);at_print(LOG_DEBUG, |
| 300 | "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x20\x69\x73\x50\x75\x73\x68\x53\x6d\x73\x20\x3d\x25\x64\x20" "\n" |
| 301 | ,isPushSms);if(SMS_NOTIFICATION==isPushSms){BakNotificationSms(one_sms.TP_UD, |
| 302 | strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0xb0a+6584-0x24c2));}if( |
| 303 | SMS_NO_PUSH!=isPushSms){at_print(LOG_DEBUG, |
| 304 | "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x69\x6e\x64\x65\x78\x20\x3d\x20\x25\x64" "\n" |
| 305 | ,one_sms.index);at_print(LOG_DEBUG, |
| 306 | "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x54\x50\x5f\x52\x65\x66\x65\x72\x4e\x75\x6d\x20\x3d\x20\x25\x64" "\n" |
| 307 | ,one_sms.TP_ReferNum);at_print(LOG_DEBUG, |
| 308 | "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x54\x50\x5f\x41\x6c\x6c\x50\x69\x65\x63\x65\x4e\x75\x6d\x20\x3d\x20\x25\x64" "\n" |
| 309 | ,one_sms.TP_AllPieceNum);at_print(LOG_DEBUG, |
| 310 | "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x54\x50\x5f\x43\x75\x72\x72\x65\x6e\x74\x50\x69\x65\x63\x65\x4e\x75\x6d\x20\x3d\x20\x25\x64" "\n" |
| 311 | ,one_sms.TP_CurrentPieceNum);zUfiSms_ChangeMainState(SMS_STATE_RECVED);return;} |
| 312 | zUfiSms_GetReportStatus(ptRespData->pdu,&ptRespData->stat);(void)String2Bytes( |
| 313 | ptRespData->pdu,acFormatPdu,(int)strlen(ptRespData->pdu));if( |
| 314 | (0x1208+4515-0x23a6)==ptRespData->stat){(void)zUfiSms_HandleReport(acFormatPdu); |
| 315 | sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");return;} |
| 316 | sc_cfg_get(NV_DEFAULT_STORE,defaultStore,sizeof(defaultStore));if( |
| 317 | (0x62+2104-0x89a)==strcmp(defaultStore,"\x73\x69\x6d")){iStorePos= |
| 318 | WMS_STORAGE_TYPE_UIM_V01;}(void)zUfiSms_DecodeSmsData(&tDbStoreData,ptRespData-> |
| 319 | index,iStorePos,(T_SmsStatus)ptRespData->stat,WMS_MESSAGE_FORMAT_GW_PP_V01, |
| 320 | ptRespData->length,acFormatPdu);if(tDbStoreData.sms_class==WMS_MESSAGE_CLASS_2){ |
| 321 | iStorePos=WMS_STORAGE_TYPE_UIM_V01;}zUfiSms_TrafficChangeSmsTag(&tDbStoreData); |
| 322 | if(ZTE_WMS_NV_MEMORY_FULL==zUfiSms_WriteSmsToDb(&tDbStoreData,iStorePos,- |
| 323 | (0x297+4578-0x1478))){return;}if(tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){} |
| 324 | zUfiSms_CmgrNvSet();zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV); |
| 325 | zUfiSms_ChangeMainState(SMS_STATE_RECVED);zUfiSms_HandleTrafficSms(&tDbStoreData |
| 326 | );return;}void zUfiSms_CmgrRespProc(T_zSms_SmsInd*ptRespData){zUfiSms_StoreType |
| 327 | iStorePos=WMS_STORAGE_TYPE_NV_V01;unsigned char acFormatPdu[ZSMS_PDU_SIZE]={ |
| 328 | (0x8b7+7273-0x2520)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms= |
| 329 | (0x54a+8076-0x24d6);SMS_PARAM one_sms={(0x125b+1354-0x17a5)};int |
| 330 | unread_sms_before_recv_new_sms=(0x4aa+5375-0x19a9);memset(&tDbStoreData, |
| 331 | (0xda9+3736-0x1c41),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG, |
| 332 | "\x5b\x53\x4d\x53\x5d\x20\x45\x6e\x74\x65\x72\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x21\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2f\x73\x74\x61\x74\x3a\x25\x64\x2f\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2f\x70\x64\x75\x3a\x25\x73\x21" "\n" |
| 333 | ,ptRespData->index,ptRespData->stat,ptRespData->length,ptRespData->pdu); |
| 334 | zUfiSms_SendSmsStatusInfo(MSG_SMS_READING);if(strcmp(ptRespData->pdu,"")== |
| 335 | (0x1001+3027-0x1bd4)){CHAR srState[(0x21cf+916-0x2531)]={(0x1840+2664-0x22a8)}; |
| 336 | sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if((0x696+1415-0xc1d)!=strcmp( |
| 337 | srState,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x69\x6e\x67")){sc_cfg_set( |
| 338 | NV_SMS_RECV_RESULT,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(SMS_STATE_RECVED) |
| 339 | ;}else{sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");} |
| 340 | return;}isPushSms=DecodePushPdu(ptRespData->pdu,&one_sms);at_print(LOG_DEBUG, |
| 341 | "\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x20\x69\x73\x50\x75\x73\x68\x53\x6d\x73\x20\x3d\x20\x25\x64" "\n" |
| 342 | ,isPushSms);at_print(LOG_DEBUG, |
| 343 | "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x20\x69\x73\x50\x75\x73\x68\x53\x6d\x73\x20\x3d\x25\x64\x20" "\n" |
| 344 | ,isPushSms);if(SMS_NOTIFICATION==isPushSms){BakNotificationSms(one_sms.TP_UD, |
| 345 | strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0x301+6959-0x1e30));}if( |
| 346 | SMS_NO_PUSH!=isPushSms){at_print(LOG_DEBUG, |
| 347 | "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x69\x6e\x64\x65\x78\x20\x3d\x20\x25\x64" "\n" |
| 348 | ,one_sms.index);at_print(LOG_DEBUG, |
| 349 | "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x54\x50\x5f\x52\x65\x66\x65\x72\x4e\x75\x6d\x20\x3d\x20\x25\x64" "\n" |
| 350 | ,one_sms.TP_ReferNum);at_print(LOG_DEBUG, |
| 351 | "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x54\x50\x5f\x41\x6c\x6c\x50\x69\x65\x63\x65\x4e\x75\x6d\x20\x3d\x20\x25\x64" "\n" |
| 352 | ,one_sms.TP_AllPieceNum);at_print(LOG_DEBUG, |
| 353 | "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x54\x50\x5f\x43\x75\x72\x72\x65\x6e\x74\x50\x69\x65\x63\x65\x4e\x75\x6d\x20\x3d\x20\x25\x64" "\n" |
| 354 | ,one_sms.TP_CurrentPieceNum);zUfiSms_ChangeMainState(SMS_STATE_RECVED);return;} |
| 355 | zUfiSms_GetReportStatus(ptRespData->pdu,&ptRespData->stat);(void)String2Bytes( |
| 356 | ptRespData->pdu,acFormatPdu,(int)strlen(ptRespData->pdu));if( |
| 357 | (0x135f+3869-0x2277)==ptRespData->stat){(void)zUfiSms_HandleReport(acFormatPdu); |
| 358 | sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");return;}( |
| 359 | void)zUfiSms_DecodeSmsData(&tDbStoreData,ptRespData->index,iStorePos,( |
| 360 | T_SmsStatus)ptRespData->stat,WMS_MESSAGE_FORMAT_GW_PP_V01,ptRespData->length, |
| 361 | acFormatPdu);if(tDbStoreData.sms_class==WMS_MESSAGE_CLASS_2){iStorePos= |
| 362 | WMS_STORAGE_TYPE_UIM_V01;}if(zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){ |
| 363 | unread_sms_before_recv_new_sms=(0xf71+5803-0x261b);}else{ |
| 364 | unread_sms_before_recv_new_sms=(0xd67+1763-0x144a);}if(ZTE_WMS_NV_MEMORY_FULL== |
| 365 | zUfiSms_WriteSmsToDb(&tDbStoreData,iStorePos,-(0xc16+328-0xd5d))){return;}if( |
| 366 | tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){}zUfiSms_CmgrNvSet(); |
| 367 | zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);zUfiSms_ChangeMainState( |
| 368 | SMS_STATE_RECVED);return;}void zUfiSms_CmgsRespProc(VOID){T_zUfiSms_StatusInfo |
| 369 | tStatusInfo={(0x700+2008-0xed8)};g_zUfiSms_DbStoreData->msg_displaymode= |
| 370 | g_displaymode;if(g_zUfiSms_DbStoreData->msg_displaymode!=(0x1bbc+2507-0x2586)){ |
| 371 | if((0x1bd4+1105-0x2025)==zUfiSms_WriteSmsToDb(&g_zUfiSms_DbStoreData[ |
| 372 | g_zUfiSms_CurConcatSegNo-(0x35f+2529-0xd3f)],WMS_STORAGE_TYPE_NV_V01,- |
| 373 | (0x183+1522-0x774))){g_zUfiSms_MsgRefer++;(void)zUfiSms_SetMaxReference( |
| 374 | g_zUfiSms_MsgRefer);}}printf( |
| 375 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x67\x73\x52\x73\x70\x20\x73\x65\x67\x4e\x6f\x3a\x25\x64\x2f\x54\x6f\x74\x61\x6c\x4e\x75\x6d\x3a\x25\x64\x2f\x46\x61\x69\x6c\x4e\x75\x6d\x3a\x25\x64\x2e" "\n" |
| 376 | ,g_zUfiSms_CurConcatSegNo,g_zUfiSms_ConcatTotalNum,g_zUfiSms_SendFailedCount);if |
| 377 | (g_zUfiSms_CurConcatSegNo==g_zUfiSms_ConcatTotalNum){g_zUfiSms_CurConcatSegNo= |
| 378 | (0x362+8307-0x23d5);memset((void*)&tStatusInfo,(0x183+5112-0x157b),sizeof( |
| 379 | T_zUfiSms_StatusInfo));tStatusInfo.err_code=ZTE_SMS_CMS_NONE;tStatusInfo. |
| 380 | send_failed_count=g_zUfiSms_SendFailedCount;tStatusInfo.delete_failed_count= |
| 381 | (0x866+7294-0x24e4);if(g_zUfiSms_SendFailedCount==(0xa62+1848-0x119a)){ |
| 382 | tStatusInfo.cmd_status=WMS_CMD_SUCCESS;sc_cfg_set(NV_SMS_SEND_RESULT,"\x6f\x6b") |
| 383 | ;}else{tStatusInfo.cmd_status=WMS_CMD_FAILED;sc_cfg_set(NV_SMS_SEND_RESULT, |
| 384 | "\x66\x61\x69\x6c");}tStatusInfo.cmd=WMS_SMS_CMD_MSG_SEND;(void) |
| 385 | zUfiSms_SetCmdStatus(&tStatusInfo);sc_cfg_set(NV_SMS_DB_CHANGE,"\x31"); |
| 386 | zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);if(g_zUfiSms_MemFullFlag[ |
| 387 | WMS_STORAGE_TYPE_NV_V01]){zUfiSms_SendSmsStatusInfo(MSG_SMS_DEFAULT);}}else{}} |
| 388 | int zte_fota_notifyPushMsg(int cmd){FOTA_MSG_BUF msg={(0x8f+7512-0x1de7)};int |
| 389 | errs=(0x5a0+6377-0x1e89);key_t req_id=ftok( |
| 390 | "\x2f\x6d\x65\x64\x69\x61\x2f\x7a\x74\x65\x2f\x7a\x74\x65\x5f\x73\x6f\x63\x6b\x65\x74\x2f\x66\x6f\x74\x61\x5f\x64\x6d\x61\x70\x70\x5f\x6d\x73\x67" |
| 391 | ,(0x138f+1262-0x187c));int msgid=msgget(req_id,(0x205+558-0x433));if(msgid!=- |
| 392 | (0x334+1294-0x841)){msg.mtype=(0x6c3+245-0x7b7);msg.mtext[(0x1a46+1438-0x1fe4)]= |
| 393 | WEBUI_NOTIFY_PUSH_MSG_;errs=msgsnd(msgid,&msg,sizeof(msg)-sizeof(long), |
| 394 | (0x42a+6169-0x1c43));}return(errs<(0x505+8564-0x2679)?(0x13c8+4378-0x24e2): |
| 395 | (0x556+5523-0x1ae8));} |
| 396 | #if (0x979+7072-0x2519) |
| 397 | int atSms_SendCmglReq(PSTR pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){return |
| 398 | zSvr_SendAtSyn(ZAT_CMGL_CMD,"\x41\x54\x2b\x43\x4d\x47\x4c\x3d\x30" "\r\n",cid, |
| 399 | pAtRst,atRstSize);}VOID atSms_RecvCmglRsp(T_zAt_AtRes*pResLine){return;} |
| 400 | #endif
|
| 401 | #if (0x1aa5+1940-0x2239) |
| 402 | int atSms_SendZmglReq(PSTR pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){int res |
| 403 | =(0x9cf+952-0xd87);pthread_mutex_lock(&smsdb_mutex);res=zSvr_SendAtSyn( |
| 404 | ZAT_ZMGL_CMD,"\x41\x54\x2b\x5a\x4d\x47\x4c\x3d\x34" "\r\n",cid,pAtRst,atRstSize) |
| 405 | ;pthread_mutex_unlock(&smsdb_mutex);return res;}VOID atSms_initAtOk(VOID){ |
| 406 | T_zUfiSms_StatusInfo tStatus={(0x374+3933-0x12d1)};sc_cfg_set(NV_SMS_LOAD_RESULT |
| 407 | ,"\x6f\x6b");tStatus.cmd_status=WMS_CMD_SUCCESS;tStatus.cmd=WMS_SMS_CMD_INIT;( |
| 408 | void)zUfiSms_SetCmdStatus(&tStatus);zUfiSms_ChangeMainState(SMS_STATE_LOADED);} |
| 409 | int atSms_initAtErr(UINT8*pErrCode){T_zUfiSms_StatusInfo tStatus={ |
| 410 | (0xec4+2318-0x17d2)};sc_cfg_set(NV_SMS_LOAD_RESULT,"\x66\x61\x69\x6c"); |
| 411 | zUfiSms_ChangeMainState(SMS_STATE_LOADED);tStatus.cmd_status=WMS_CMD_FAILED; |
| 412 | tStatus.cmd=WMS_SMS_CMD_INIT;(void)zUfiSms_SetCmdStatus(&tStatus);return FALSE;} |
| 413 | VOID atSms_RecvZmglRsp(T_zAt_AtRes*pResLine){static T_zUfiSms_SmsItem tSmsPara={ |
| 414 | (0x157f+1247-0x1a5e)};printf( |
| 415 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x5a\x6d\x67\x6c\x52\x73\x70\x20\x45\x6e\x74\x65\x72\x20\x70\x64\x75\x46\x6c\x61\x67\x3a\x25\x64\x2f\x72\x65\x73\x75\x6c\x74\x3a\x25\x64\x2e" "\n" |
| 416 | ,pResLine->pduFlag,pResLine->result);if(pResLine->pduFlag==ZAT_ATRES_PDU_FLAG){ |
| 417 | zUfiSms_CmglRespProc(pResLine,&tSmsPara);}else{memset(&tSmsPara, |
| 418 | (0x10e5+5423-0x2614),sizeof(T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine |
| 419 | ->resParas,sizeof(pResLine->resParas),&tSmsPara,(0x9a5+4514-0x1b46));printf( |
| 420 | "\x5b\x53\x4d\x53\x5d\x20\x5a\x6d\x67\x6c\x20\x52\x65\x73\x70\x21\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2f\x73\x74\x61\x74\x3a\x25\x64\x2f\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2e" "\n" |
| 421 | ,tSmsPara.index,tSmsPara.stat,tSmsPara.length);}}int atSms_SendCmgrReq(PSTR |
| 422 | pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[(0x443+8871-0x26d6) |
| 423 | ]={(0xd5d+4902-0x2083)};iSmsIndex=atoi(pAtCmdPara);printf( |
| 424 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6d\x67\x72\x52\x65\x71\x20\x47\x65\x74\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2e" "\n" |
| 425 | ,iSmsIndex);snprintf(pAtcmdStr,sizeof(pAtcmdStr), |
| 426 | "\x41\x54\x2b\x43\x4d\x47\x52\x3d\x25\x73" "\r\n",pAtCmdPara);return |
| 427 | zSvr_SendAtSyn(ZAT_CMGR_CMD,pAtcmdStr,cid,pAtRst,atRstSize);}VOID |
| 428 | atSms_RecvCmgrRsp(T_zAt_AtRes*pResLine){ |
| 429 | #if (0x917+2861-0x1444)
|
| 430 | static T_zUfiSms_SmsItem tSmsPara={(0x172b+1529-0x1d24)};T_zUfiSms_CmgrSetRsp |
| 431 | tCmgrRsp={(0x150c+400-0x169c)};printf( |
| 432 | "\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x67\x72\x52\x73\x70\x20\x45\x6e\x74\x65\x72\x20\x70\x64\x75\x46\x6c\x61\x67\x3a\x25\x64\x2f\x50\x61\x72\x61\x73\x3a\x25\x73\x2f\x72\x65\x73\x75\x6c\x74\x3a\x25\x64\x2e" "\n" |
| 433 | ,pResLine->pduFlag,pResLine->resParas,pResLine->result);if(pResLine->pduFlag== |
| 434 | ZAT_ATRES_PDU_FLAG){if(ZAT_RESULT_AUTOREPORT!=pResLine->result){printf( |
| 435 | "\x21\x21\x21\x21\x21\x21\x21\x21\x21\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x67\x72\x52\x73\x70\x20\x67\x65\x74\x20\x72\x65\x73\x75\x6c\x74\x20\x45\x72\x72\x6f\x72\x2e" "\n" |
| 436 | );return;}tCmgrRsp.index=tSmsPara.index;tCmgrRsp.length=tSmsPara.length;tCmgrRsp |
| 437 | .stat=tSmsPara.stat;sscanf(pResLine->resParas,"\x25\x35\x30\x30\x73",tCmgrRsp. |
| 438 | pdu);zUfiSms_CmgrRespProc(&tCmgrRsp);zUfiMmi_SendSmsStatus();sc_cfg_set( |
| 439 | "\x73\x6d\x73\x5f\x72\x65\x63\x76\x5f\x72\x65\x73\x75\x6c\x74","\x6f\x6b");}else |
| 440 | {memset(&tSmsPara,(0x1307+4716-0x2573),sizeof(T_zUfiSms_SmsItem));(void) |
| 441 | zUfiSms_FormatSms(pResLine->resParas,&tSmsPara,(0x733+6534-0x20b7));tSmsPara. |
| 442 | index=iSmsIndex;printf( |
| 443 | "\x3d\x3d\x3d\x3d\x3d\x3d\x43\x6d\x67\x72\x20\x52\x65\x73\x70\x21\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2f\x73\x74\x61\x74\x3a\x25\x64\x2f\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2e" "\n" |
| 444 | ,tSmsPara.index,tSmsPara.stat,tSmsPara.length);} |
| 445 | #endif
|
| 446 | }int atSms_SendZmgrReq(PSTR pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){CHAR |
| 447 | pAtcmdStr[(0x12ec+4760-0x2570)]={(0x1e5a+1155-0x22dd)};iSmsIndex=atoi(pAtCmdPara |
| 448 | );printf( |
| 449 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x5a\x6d\x67\x72\x52\x65\x71\x20\x47\x65\x74\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2e" "\n" |
| 450 | ,iSmsIndex);snprintf(pAtcmdStr,sizeof(pAtcmdStr), |
| 451 | "\x41\x54\x2b\x5a\x4d\x47\x52\x3d\x25\x73" "\r\n",pAtCmdPara);return |
| 452 | zSvr_SendAtSyn(ZAT_ZMGR_CMD,pAtcmdStr,cid,pAtRst,atRstSize);}VOID |
| 453 | atSms_RecvZmgrOk(T_zAt_AtRes*pResLine,UINT8*nextAt){return;}VOID |
| 454 | atSms_RecvZmgrErr(T_zAt_AtRes*pResLine,UINT8*nextAt){at_print(LOG_DEBUG, |
| 455 | "\x53\x4d\x53\x20\x7a\x6d\x67\x72\x20\x69\x73\x20\x66\x61\x69\x6c" "\n"); |
| 456 | at_print(LOG_DEBUG |
| 457 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x5a\x6d\x67\x72\x45\x72\x72\x20\x20\x53\x4d\x53\x20\x7a\x6d\x67\x72\x20\x69\x73\x20\x66\x61\x69\x6c" "\n" |
| 458 | );{sc_cfg_set(NV_SMS_RECV_RESULT,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState( |
| 459 | SMS_STATE_RECVED);}}VOID atSms_RecvZmgrRsp(T_zAt_AtRes*pResLine){static |
| 460 | T_zUfiSms_SmsItem tSmsPara={(0x753+3546-0x152d)};T_zUfiSms_CmgrSetRsp tCmgrRsp={ |
| 461 | (0x1ef3+1207-0x23aa)};printf( |
| 462 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x5a\x6d\x67\x72\x52\x73\x70\x20\x45\x6e\x74\x65\x72\x20\x70\x64\x75\x46\x6c\x61\x67\x3a\x25\x64\x2f\x50\x61\x72\x61\x73\x3a\x25\x73\x2f\x72\x65\x73\x75\x6c\x74\x3a\x25\x64\x2e" "\n" |
| 463 | ,pResLine->pduFlag,pResLine->resParas,pResLine->result);if(pResLine->pduFlag== |
| 464 | ZAT_ATRES_PDU_FLAG){if(ZAT_RESULT_AUTOREPORT!=pResLine->result){printf( |
| 465 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x5a\x6d\x67\x72\x52\x73\x70\x20\x67\x65\x74\x20\x72\x65\x73\x75\x6c\x74\x20\x45\x72\x72\x6f\x72\x2e" "\n" |
| 466 | );return;}tCmgrRsp.index=tSmsPara.index;tCmgrRsp.length=tSmsPara.length;tCmgrRsp |
| 467 | .stat=tSmsPara.stat;sscanf(pResLine->resParas,"\x25\x35\x30\x30\x73",tCmgrRsp. |
| 468 | pdu);zUfiSms_ZmgrRespProc(&tCmgrRsp);zUfiMmi_SendSmsStatus();sc_cfg_set( |
| 469 | NV_SMS_RECV_RESULT,"\x6f\x6b");}else{memset(&tSmsPara,(0x164+6948-0x1c88),sizeof |
| 470 | (T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine->resParas,sizeof(pResLine |
| 471 | ->resParas),&tSmsPara,(0x1d1b+2531-0x26fc));tSmsPara.index=iSmsIndex;printf( |
| 472 | "\x5b\x53\x4d\x53\x5d\x20\x5a\x6d\x67\x72\x20\x52\x65\x73\x70\x21\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2f\x73\x74\x61\x74\x3a\x25\x64\x2f\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2e" "\n" |
| 473 | ,tSmsPara.index,tSmsPara.stat,tSmsPara.length);}}int atSms_SendCmgdReq(PSTR |
| 474 | pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[(0x27d+4796-0x1525) |
| 475 | ]={(0x97d+1670-0x1003)};snprintf(pAtcmdStr,sizeof(pAtcmdStr), |
| 476 | "\x41\x54\x2b\x43\x4d\x47\x44\x3d\x25\x73" "\r\n",pAtCmdPara);return |
| 477 | zSvr_SendAtSyn(ZAT_CMGD_CMD,pAtcmdStr,cid,pAtRst,atRstSize);}VOID |
| 478 | atSms_RecvCmgdOk(VOID){CHAR strUsed[(0x1690+1574-0x1cac)]={(0x913+4519-0x1aba)}; |
| 479 | int used=(0x1bd3+2499-0x2596);sc_cfg_set(NV_SMS_DEL_RESULT,"\x6f\x6b");printf( |
| 480 | "\x5b\x53\x4d\x53\x5d\x20\x73\x65\x74\x20\x73\x69\x6d\x5f\x64\x65\x6c\x5f\x72\x65\x73\x75\x6c\x74\x20\x74\x6f\x20\x4f\x4b\x2e\x20" "\n" |
| 481 | );sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_USED,strUsed,sizeof(strUsed));used=atoi( |
| 482 | strUsed)-(0x9c0+3095-0x15d6);if(used<(0x1763+1318-0x1c89)){used= |
| 483 | (0x114c+1414-0x16d2);}memset(&strUsed,(0x7c+677-0x321),(0x152f+1998-0x1cf3)); |
| 484 | snprintf(strUsed,sizeof(strUsed),"\x25\x64",used);sc_cfg_set( |
| 485 | ZTE_WMS_NVCONFIG_SIM_CARD_USED,strUsed);}VOID atSms_RecvCmgdErr(VOID){sc_cfg_set |
| 486 | (NV_SMS_DEL_RESULT,"\x66\x61\x69\x6c");printf( |
| 487 | "\x5b\x53\x4d\x53\x5d\x20\x73\x65\x74\x20\x73\x69\x6d\x5f\x64\x65\x6c\x5f\x72\x65\x73\x75\x6c\x74\x20\x74\x6f\x20\x66\x61\x69\x6c\x2e\x20" "\n" |
| 488 | );}VOID atSms_RecvCmgdFinish(VOID){char StrValue[(0x206f+386-0x21e7)]={ |
| 489 | (0xacb+3889-0x19fc)};CHAR strTotal[(0x156b+799-0x1880)]={(0x192c+1325-0x1e59)}; |
| 490 | CHAR strUsed[(0xa58+4353-0x1b4f)]={(0x34c+8283-0x23a7)};int total= |
| 491 | (0x1064+5727-0x26c3);int used=(0xe0d+3097-0x1a26);int remain=(0x430+258-0x532); |
| 492 | sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_USED,strUsed,sizeof(strUsed));used=atoi( |
| 493 | strUsed);sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_TOTAL,strTotal,sizeof(strTotal)); |
| 494 | total=atoi(strTotal);remain=total-used;if(remain<(0xa0+7377-0x1d71)){remain= |
| 495 | (0xf35+1527-0x152c);}memset(&StrValue,(0x1482+3767-0x2339),(0x4c+8372-0x20f6)); |
| 496 | snprintf(StrValue,sizeof(StrValue),"\x25\x64",remain);sc_cfg_set( |
| 497 | ZTE_WMS_NVCONFIG_SIM_CARD_REMAIN,StrValue);printf( |
| 498 | "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x53\x69\x6d\x53\x6d\x73\x20\x75\x73\x65\x64\x3d\x25\x64\x2c\x72\x65\x6d\x61\x69\x6e\x3d\x25\x64\x2c\x74\x6f\x74\x61\x6c\x3d\x25\x64" "\n" |
| 499 | ,used,remain,total);zUfiSms_ChangeMainState(SMS_STATE_DELED);sc_cfg_set( |
| 500 | NV_SMS_DB_CHANGE,"\x31");}int atSms_SendCmgsReq(PSTR pAtCmdPara,int cid,PSTR |
| 501 | pAtRst,int atRstSize){int atRes=(0xe4b+3483-0x1be6);CHAR pAtcmdStr[ZSMS_PDU_SIZE |
| 502 | ]={(0xba+3074-0xcbc)};snprintf(pAtcmdStr,sizeof(pAtcmdStr), |
| 503 | "\x41\x54\x2b\x43\x4d\x47\x53\x3d\x25\x64" "\r\n",g_zUfiSms_FinalCmgsBuf.length) |
| 504 | ;atRes=zSvr_SendAtSyn(ZAT_CMGS_CMD,pAtcmdStr,cid,pAtRst,atRstSize);if(atRes!= |
| 505 | ZAT_RESULT_SMS){return atRes;}memset(pAtcmdStr,(0x190c+644-0x1b90),ZSMS_PDU_SIZE |
| 506 | );if(strlen(g_zUfiSms_FinalCmgsBuf.pdu)<ZSMS_PDU_SIZE-(0x12dc+1160-0x1763)){ |
| 507 | memcpy(pAtcmdStr,g_zUfiSms_FinalCmgsBuf.pdu,strlen(g_zUfiSms_FinalCmgsBuf.pdu)); |
| 508 | }else{printf( |
| 509 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6d\x67\x73\x52\x65\x71\x20\x70\x64\x75\x20\x74\x6f\x6f\x20\x6c\x6f\x6e\x67\x3a\x25\x73" "\n" |
| 510 | ,g_zUfiSms_FinalCmgsBuf.pdu);memcpy(pAtcmdStr,g_zUfiSms_FinalCmgsBuf.pdu, |
| 511 | ZSMS_PDU_SIZE-(0x610+601-0x867));}*(pAtcmdStr+strlen(g_zUfiSms_FinalCmgsBuf.pdu) |
| 512 | )=ZSMS_CTRL_Z_CHAR;memset(pAtRst,(0xb7+1731-0x77a),atRstSize);return |
| 513 | zSvr_SendAtSyn(ZAT_CMGS_CMD,pAtcmdStr,cid,pAtRst,atRstSize);}VOID |
| 514 | atSms_RecvCmgsOk(UINT8*pResLine,int cid){at_print(LOG_DEBUG, |
| 515 | "\x73\x6d\x73\x20\x73\x65\x6e\x64\x65\x64\x20\x73\x75\x63\x63\x65\x73\x73\x2e\x20" "\n" |
| 516 | );g_zUfiSms_CurConcatSegNo++;if(g_zUfiSms_CurConcatSegNo> |
| 517 | ZTE_WMS_CONCAT_SMS_COUNT_MAX){return;}g_zUfiSms_DbStoreData[ |
| 518 | g_zUfiSms_CurConcatSegNo-(0x17d+9261-0x25a9)].tag=WMS_TAG_TYPE_MO_SENT_V01; |
| 519 | zUfiSms_CmgsRespProc(cid);}VOID atSms_RecvCmgsErr(UINT8*pResLine,int cid){ |
| 520 | at_print(LOG_DEBUG, |
| 521 | "\x73\x6d\x73\x20\x73\x65\x6e\x64\x65\x64\x20\x66\x61\x69\x6c\x2e\x20" "\n"); |
| 522 | g_zUfiSms_CurConcatSegNo++;if(g_zUfiSms_CurConcatSegNo> |
| 523 | ZTE_WMS_CONCAT_SMS_COUNT_MAX){return;}g_zUfiSms_SendFailedCount++;at_print( |
| 524 | LOG_DEBUG, |
| 525 | "\x73\x65\x6e\x64\x20\x73\x6d\x73\x20\x66\x61\x69\x6c\x65\x64\x2c\x73\x6f\x20\x77\x72\x69\x74\x65\x20\x73\x6d\x73\x20\x74\x6f\x20\x64\x72\x61\x66\x74\x62\x6f\x78\x2e" "\n" |
| 526 | );g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0x5bc+3822-0x14a9)].tag= |
| 527 | WMS_TAG_TYPE_MO_NOT_SENT_V01;if(g_zUfiSms_ConcatTotalNum>(0x1198+3115-0x1dc2)){ |
| 528 | g_zUfiSms_IsConcatSendSuc=FALSE;}zUfiSms_CmgsRespProc(cid);}VOID |
| 529 | atSms_RecvCmgsRsp(T_zAt_AtRes*pResLine){return;}VOID atSms_RecvCmtRsp( |
| 530 | T_zAt_AtRes*pResLine){CHAR needSMS[(0x10b5+773-0x1388)]={(0x209+3612-0x1025)}; |
| 531 | sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0xe41+3041-0x1a22)== |
| 532 | strcmp(needSMS,"\x6e\x6f")){printf( |
| 533 | "\x5b\x53\x4d\x53\x5d\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x6e\x65\x65\x64\x53\x4d\x53\x3d\x6e\x6f\x21" |
| 534 | );return;}static T_zUfiSms_SmsItem tSmsPara={(0x19d9+2833-0x24ea)}; |
| 535 | T_zUfiSms_CmtSetRsp tCmtRsp={(0xab0+4246-0x1b46)};if(NULL==pResLine){return;} |
| 536 | printf( |
| 537 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x45\x6e\x74\x65\x72\x20\x70\x64\x75\x46\x6c\x61\x67\x3a\x25\x64\x2f\x50\x61\x72\x61\x73\x3a\x25\x73\x2f\x72\x65\x73\x75\x6c\x74\x3a\x25\x64\x2e" "\n" |
| 538 | ,pResLine->pduFlag,pResLine->resParas,pResLine->result);if(pResLine->pduFlag== |
| 539 | ZAT_ATRES_PDU_FLAG){if(ZAT_RESULT_AUTOREPORT!=pResLine->result){printf( |
| 540 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x67\x65\x74\x20\x72\x65\x73\x75\x6c\x74\x20\x45\x72\x72\x6f\x72\x2e" "\n" |
| 541 | );return;}tCmtRsp.length=tSmsPara.length;sscanf(pResLine->resParas, |
| 542 | "\x25\x35\x30\x30\x73",tCmtRsp.pdu);pthread_mutex_lock(&smsdb_mutex); |
| 543 | zUfiSms_CmtRespProc(&tCmtRsp);zUfiMmi_SendSmsStatus();pthread_mutex_unlock(& |
| 544 | smsdb_mutex);sc_cfg_set(NV_SMS_RECV_RESULT,"\x6f\x6b");}else{memset(&tSmsPara, |
| 545 | (0xb79+3209-0x1802),sizeof(T_zUfiSms_SmsItem));atBase_PreProcRes(pResLine-> |
| 546 | resParas,sizeof(pResLine->resParas));printf( |
| 547 | "\x5b\x53\x4d\x53\x5d\x20\x63\x6d\x74\x20\x69\x6e\x64\x21\x20\x70\x52\x65\x73\x4c\x69\x6e\x65\x2d\x3e\x72\x65\x73\x50\x61\x72\x61\x73\x3a\x25\x73\x2e" "\n" |
| 548 | ,pResLine->resParas);sscanf(pResLine->resParas,"\x25\x73\x20\x25\x64",tSmsPara. |
| 549 | alpha,&tSmsPara.length);printf( |
| 550 | "\x5b\x53\x4d\x53\x5d\x20\x63\x6d\x74\x20\x69\x6e\x64\x21\x20\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2e" "\n" |
| 551 | ,tSmsPara.length);}}VOID atSms_RecvCmtiRsp(T_zAt_AtRes*pResLine){CHAR needSMS[ |
| 552 | (0x3a+4255-0x10a7)]={(0x1997+2178-0x2219)};sc_cfg_get(NV_NEED_SUPPORT_SMS, |
| 553 | needSMS,sizeof(needSMS));if((0x1f9+9003-0x2524)==strcmp(needSMS,"\x6e\x6f")){ |
| 554 | printf( |
| 555 | "\x5b\x53\x4d\x53\x5d\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x6e\x65\x65\x64\x53\x4d\x53\x3d\x6e\x6f\x21" |
| 556 | );return;}char sms_Main_state[(0xe6f+3877-0x1d76)]={(0x12b9+2632-0x1d01)};char* |
| 557 | memory=NULL;printf( |
| 558 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x69\x52\x73\x70\x20\x65\x6e\x74\x65\x72\x20\x25\x73\x2e" "\n" |
| 559 | ,pResLine->resParas);if(NULL==pResLine){return;}if(ZAT_CMTI_CMD!=pResLine-> |
| 560 | atCmdId){return;}sc_cfg_get(NV_SMS_STATE,sms_Main_state,sizeof(sms_Main_state)); |
| 561 | if(strcmp(sms_Main_state,"\x73\x6d\x73\x5f\x64\x65\x6c\x69\x6e\x67")== |
| 562 | (0x1246+1277-0x1743)){printf( |
| 563 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x69\x52\x73\x70\x3a\x20\x73\x6d\x73\x5f\x64\x65\x6c\x69\x6e\x67" "\n" |
| 564 | );return;}memory=strstr(pResLine->resParas,"\"");if(NULL!=memory){memory++;}if( |
| 565 | (0x7+3385-0xd40)==strncmp("\x53\x4d",memory,(0x14e2+4183-0x2537))){ |
| 566 | zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);zUfiSms_ChangeMainState( |
| 567 | SMS_STATE_RECVING);memory+=(0x682+7316-0x2312);printf( |
| 568 | "\x5b\x53\x4d\x53\x5d\x20\x73\x65\x6e\x64\x20\x63\x6d\x67\x72\x3a\x20\x25\x73" "\n" |
| 569 | ,memory);zSvr_InnerSendMsg(ZUFI_MODULE_ID_AT_LOCAL,ZUFI_MODULE_ID_AT_UNSOLI, |
| 570 | MSG_CMD_AT_ZMGR,strlen(memory),memory);}else{printf( |
| 571 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x69\x52\x73\x70\x20\x3a\x73\x74\x6f\x72\x65\x20\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x20\x6e\x6f\x74\x20\x53\x4d\x2e" "\n" |
| 572 | );}sc_cfg_set(NV_SMS_RECV_RESULT,"");}VOID atSms_RecvCdsRsp(T_zAt_AtRes*pResLine |
| 573 | ){CHAR needSMS[(0x1429+2746-0x1eb1)]={(0x519+4865-0x181a)};sc_cfg_get( |
| 574 | NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x1537+3158-0x218d)==strcmp( |
| 575 | needSMS,"\x6e\x6f")){printf( |
| 576 | "\x5b\x53\x4d\x53\x5d\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x6e\x65\x65\x64\x53\x4d\x53\x3d\x6e\x6f\x21" |
| 577 | );return;}static T_zUfiSms_SmsItem tSmsPara={(0x1867+1625-0x1ec0)}; |
| 578 | T_zUfiSms_CmgrSetRsp tCmgrRsp={(0x276+5695-0x18b5)};if(NULL==pResLine){return;} |
| 579 | if(pResLine->pduFlag==ZAT_ATRES_PDU_FLAG){if(ZAT_RESULT_AUTOREPORT!=pResLine-> |
| 580 | result){printf( |
| 581 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x52\x73\x70\x20\x67\x65\x74\x20\x72\x65\x73\x75\x6c\x74\x20\x45\x72\x72\x6f\x72\x2e" "\n" |
| 582 | );return;}tCmgrRsp.length=tSmsPara.length;sscanf(pResLine->resParas, |
| 583 | "\x25\x35\x30\x30\x73",tCmgrRsp.pdu);pthread_mutex_lock(&smsdb_mutex); |
| 584 | zUfiSms_CdsRespProc(&tCmgrRsp);zUfiMmi_SendSmsStatus();pthread_mutex_unlock(& |
| 585 | smsdb_mutex);sc_cfg_set(NV_SMS_RECV_RESULT,"\x6f\x6b");}else{memset(&tSmsPara, |
| 586 | (0x1472+4760-0x270a),sizeof(T_zUfiSms_SmsItem));atBase_PreProcRes(pResLine-> |
| 587 | resParas,sizeof(pResLine->resParas));printf( |
| 588 | "\x5b\x53\x4d\x53\x5d\x20\x63\x64\x73\x20\x69\x6e\x64\x21\x20\x70\x52\x65\x73\x4c\x69\x6e\x65\x2d\x3e\x72\x65\x73\x50\x61\x72\x61\x73\x3a\x25\x73\x2e" "\n" |
| 589 | ,pResLine->resParas);sscanf(pResLine->resParas,"\x25\x73\x20\x25\x64",tSmsPara. |
| 590 | alpha,&tSmsPara.length);printf( |
| 591 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x52\x73\x70\x20\x63\x64\x73\x20\x69\x6e\x64\x21\x20\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2e" "\n" |
| 592 | ,tSmsPara.length);}}VOID atSms_RecvCdsiRsp(T_zAt_AtRes*pResLine){CHAR needSMS[ |
| 593 | (0x1fdf+312-0x20e5)]={(0x14b8+3005-0x2075)};sc_cfg_get(NV_NEED_SUPPORT_SMS, |
| 594 | needSMS,sizeof(needSMS));if((0x506+2099-0xd39)==strcmp(needSMS,"\x6e\x6f")){ |
| 595 | printf( |
| 596 | "\x5b\x53\x4d\x53\x5d\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x6e\x65\x65\x64\x53\x4d\x53\x3d\x6e\x6f\x21" |
| 597 | );return;}char sms_Main_state[(0x1419+153-0x1494)]={(0x182b+2074-0x2045)};char* |
| 598 | memory=NULL;printf( |
| 599 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x69\x52\x73\x70\x20\x65\x6e\x74\x65\x72\x20\x25\x73\x2e" "\n" |
| 600 | ,pResLine->resParas);if(NULL==pResLine){return;}if(ZAT_CDSI_CMD!=pResLine-> |
| 601 | atCmdId){return;}sc_cfg_get(NV_SMS_STATE,sms_Main_state,sizeof(sms_Main_state)); |
| 602 | if(strcmp(sms_Main_state,"\x73\x6d\x73\x5f\x64\x65\x6c\x69\x6e\x67")== |
| 603 | (0xb88+3843-0x1a8b)){printf( |
| 604 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x69\x52\x73\x70\x3a\x20\x73\x6d\x73\x5f\x64\x65\x6c\x69\x6e\x67" "\n" |
| 605 | );return;}memory=strstr(pResLine->resParas,"\"");if(NULL!=memory){memory++;} |
| 606 | printf( |
| 607 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x69\x52\x73\x70\x3a\x20\x6d\x65\x6d\x6f\x72\x79\x20\x3d\x20\x25\x73" "\n" |
| 608 | ,memory);if((0x672+5749-0x1ce7)==strncmp("\x53\x4d",memory,(0x2400+403-0x2591))) |
| 609 | {zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);zUfiSms_ChangeMainState( |
| 610 | SMS_STATE_RECVING);memory+=(0x18d4+1384-0x1e38);printf( |
| 611 | "\x5b\x53\x4d\x53\x5d\x20\x73\x65\x6e\x64\x20\x63\x6d\x67\x72\x3a\x20\x25\x73" "\n" |
| 612 | ,memory);zSvr_InnerSendMsg(ZUFI_MODULE_ID_AT_LOCAL,ZUFI_MODULE_ID_AT_UNSOLI, |
| 613 | MSG_CMD_AT_ZMGR,strlen(memory),memory);}else{printf( |
| 614 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x69\x52\x73\x70\x20\x3a\x73\x74\x6f\x72\x65\x20\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x20\x6e\x6f\x74\x20\x53\x4d\x2e" "\n" |
| 615 | );}sc_cfg_set(NV_SMS_RECV_RESULT,"");}int atSms_SendZmenaReq(PSTR pAtCmdPara,int |
| 616 | cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[(0x10fc+656-0x1378)]={ |
| 617 | (0xe0f+5854-0x24ed)};snprintf(pAtcmdStr,sizeof(pAtcmdStr), |
| 618 | "\x41\x54\x2b\x5a\x4d\x45\x4e\x41\x3d\x25\x73" "\r\n",pAtCmdPara);return |
| 619 | zSvr_SendAtSyn(ZAT_ZMENA_CMD,pAtcmdStr,cid,pAtRst,atRstSize);}VOID |
| 620 | atSms_RecvZmenaOk(VOID){g_Zmena_rsp=TRUE;return;}VOID atSms_RecvZmenaErr(VOID){ |
| 621 | g_Zmena_rsp=FALSE;return;}int atSms_SendCnmaReq(PSTR pAtCmdPara,int cid,PSTR |
| 622 | pAtRst,int atRstSize){int atRes=(0x68a+4025-0x1643);CHAR pAtcmdStr[ZSMS_PDU_SIZE |
| 623 | ]={(0x7f2+1008-0xbe2)};CHAR ackPduStr[(0x172c+1885-0x1e57)]={(0x3c3+4472-0x153b) |
| 624 | };if(atoi(pAtCmdPara)==(0x6e9+7538-0x245a)){snprintf(pAtcmdStr,sizeof(pAtcmdStr) |
| 625 | ,"\x41\x54\x2b\x43\x4e\x4d\x41\x3d\x25\x73" "\r\n",pAtCmdPara);atRes= |
| 626 | zSvr_SendAtSyn(ZAT_CNMA_CMD,pAtcmdStr,cid,pAtRst,atRstSize);printf( |
| 627 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6e\x6d\x61\x52\x65\x71\x20\x31\x31\x31\x31\x31\x31\x20\x61\x63\x6b\x20\x6f\x6b\x20\x3d\x20\x25\x73\x2e" "\n" |
| 628 | ,pAtcmdStr);return(0xd2a+4658-0x1f5c);}else{zUfiSms_EncodePdu_DeliverReport( |
| 629 | ackPduStr,(0xcef+5558-0x21d2));snprintf(pAtcmdStr,sizeof(pAtcmdStr), |
| 630 | "\x41\x54\x2b\x43\x4e\x4d\x41\x3d\x25\x73\x2c\x25\x64" "\r\n",pAtCmdPara,strlen( |
| 631 | ackPduStr)/(0xe50+3389-0x1b8b));atRes=zSvr_SendAtSyn(ZAT_CNMA_CMD,pAtcmdStr,cid, |
| 632 | pAtRst,atRstSize);if(atRes!=ZAT_RESULT_SMS){return atRes;}printf( |
| 633 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6e\x6d\x61\x52\x65\x71\x20\x3d\x20\x25\x73\x2e" "\n" |
| 634 | ,pAtcmdStr);memset(pAtcmdStr,(0x412+1275-0x90d),ZSMS_PDU_SIZE);if(strlen( |
| 635 | ackPduStr)<ZSMS_PDU_SIZE-(0x353+5295-0x1801)){memcpy(pAtcmdStr,ackPduStr,strlen( |
| 636 | ackPduStr));}else{printf( |
| 637 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6d\x67\x73\x52\x65\x71\x20\x70\x64\x75\x20\x74\x6f\x6f\x20\x6c\x6f\x6e\x67\x3a\x25\x73" "\n" |
| 638 | ,ackPduStr);memcpy(pAtcmdStr,ackPduStr,ZSMS_PDU_SIZE-(0xe0b+1562-0x1423));}*( |
| 639 | pAtcmdStr+strlen(ackPduStr))=ZSMS_CTRL_Z_CHAR;printf( |
| 640 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6e\x6d\x61\x52\x65\x71\x2e\x20\x70\x64\x75\x3d\x20\x25\x73" "\n" |
| 641 | ,pAtcmdStr);memset(pAtRst,(0x6aa+8231-0x26d1),atRstSize);return zSvr_SendAtSyn( |
| 642 | ZAT_CNMA_CMD,pAtcmdStr,cid,pAtRst,atRstSize);}}VOID atSms_RecvCnmaRsp( |
| 643 | T_zAt_AtRes*pResLine){return;}VOID atUnsoli_Delete_Sim_Sms(UINT8*pDatabuf,int |
| 644 | cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x19a7+2215-0x224e)};int atRes= |
| 645 | (0x196c+196-0x1a30);if(pDatabuf==NULL){return;}atRes=atSms_SendCmgdReq(pDatabuf, |
| 646 | cid,errCode,ZSVR_AT_RES_CODE_LEN);if(atRes==ZSMS_RESULT_OK){atSms_RecvCmgdOk();} |
| 647 | else{atSms_RecvCmgdErr();}atSms_RecvCmgdFinish();}VOID atUnsoli_Report_Cnma( |
| 648 | UINT8*pDatabuf,int cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x131c+1462-0x18d2) |
| 649 | };if(pDatabuf==NULL){printf( |
| 650 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x55\x6e\x73\x6f\x6c\x69\x5f\x52\x65\x70\x6f\x72\x74\x5f\x43\x6e\x6d\x61\x20\x6e\x75\x6c\x6c" |
| 651 | );return;}atSms_SendCnmaReq(pDatabuf,cid,errCode,ZSVR_AT_RES_CODE_LEN);}VOID |
| 652 | atUnsoli_Report_Zmena(UINT8*pDatabuf,int cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN] |
| 653 | ={(0x11f7+2543-0x1be6)};int atRes=(0xb9a+4471-0x1d11);if(pDatabuf==NULL){printf( |
| 654 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x55\x6e\x73\x6f\x6c\x69\x5f\x52\x65\x70\x6f\x72\x74\x5f\x5a\x6d\x65\x6e\x61\x20\x6e\x75\x6c\x6c" |
| 655 | );return;}atRes=atSms_SendZmenaReq(pDatabuf,cid,errCode,ZSVR_AT_RES_CODE_LEN);if |
| 656 | (atRes==ZSMS_RESULT_OK){atSms_RecvZmenaOk();}else{atSms_RecvZmenaErr();}}VOID |
| 657 | atUnsoli_Report_Zmgr(UINT8*pDatabuf,int cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN]= |
| 658 | {(0x1b04+672-0x1da4)};if(pDatabuf==NULL){printf( |
| 659 | "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x55\x6e\x73\x6f\x6c\x69\x5f\x52\x65\x70\x6f\x72\x74\x5f\x5a\x6d\x67\x72\x20\x6e\x75\x6c\x6c" |
| 660 | );return;}atSms_SendZmgrReq(pDatabuf,cid,errCode,ZSVR_AT_RES_CODE_LEN);} |
| 661 | #endif
|
| 662 | |