/* Decoders */
void MsgDecodeMsgId(char *pSrc, msg_message_id_t *pMsgId)
{
- memcpy(pMsgId, pSrc, sizeof(msg_message_id_t));
+ memcpy(pMsgId, pSrc, sizeof(char)*2);
}
void MsgDecodeCountInfo(char *pSrc, MSG_COUNT_INFO_S *pCountInfo)
{
- memcpy(pCountInfo, pSrc, sizeof(MSG_COUNT_INFO_S));
+ memcpy(pCountInfo, pSrc, sizeof(char)*2);
}
void MsgDecodeMemSize(char *pSrc, unsigned int *memsize)
{
- memcpy(memsize, pSrc, sizeof(unsigned int));
+ memcpy(memsize, pSrc, sizeof(char)*2);
}
void MsgDecodeMsgInfo(char *pSrc, MSG_MESSAGE_INFO_S *pMsgInfo)
{
- memcpy(pMsgInfo, pSrc, sizeof(MSG_MESSAGE_INFO_S));
+ memcpy(pMsgInfo, pSrc, sizeof(char)*2);
pSrc = pSrc + sizeof(MSG_MESSAGE_INFO_S);
void MsgDecodeMsgInfo(char *pSrc, MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S* pSendOptInfo)
{
- memcpy(pMsgInfo, pSrc, sizeof(MSG_MESSAGE_INFO_S));
+ memcpy(pMsgInfo, pSrc, sizeof(char)*2);
pSrc = pSrc + sizeof(MSG_MESSAGE_INFO_S);
{
int count = 0;
- memcpy(&count, pSrc, sizeof(int));
+ memcpy(&count, pSrc, sizeof(char)*2);
pSrc = pSrc + sizeof(int);
if( count > 0 ) {
if(pSrc == NULL)
return;
- memcpy(&count, pSrc, sizeof(int));
+ memcpy(&count, pSrc, sizeof(char)*2);
pSrc = pSrc + sizeof(int);
pMsgThreadCountList->totalCount = count;
- memcpy(&count, pSrc, sizeof(int));
+ memcpy(&count, pSrc, sizeof(char)*2);
pSrc = pSrc + sizeof(int);
pMsgThreadCountList->unReadCount = count;
- memcpy(&count, pSrc, sizeof(int));
+ memcpy(&count, pSrc, sizeof(char)*2);
pSrc = pSrc + sizeof(int);
pMsgThreadCountList->mmsMsgCount = count;
- memcpy(&count, pSrc, sizeof(int));
+ memcpy(&count, pSrc, sizeof(char)*2);
pSrc = pSrc + sizeof(int);
pMsgThreadCountList->smsMsgCount = count;
if(pSrc == NULL)
return;
- memcpy(&count, pSrc, sizeof(int));
+ memcpy(&count, pSrc, sizeof(char)*2);
pSrc = pSrc + sizeof(int);
report_list->nCount = count;
void MsgDecodeThreadId(char *pSrc, msg_thread_id_t *pThreadId)
{
- memcpy(pThreadId, pSrc, sizeof(msg_thread_id_t));
+ memcpy(pThreadId, pSrc, sizeof(char)*2);
}
void MsgDecodeThreadInfo(char *pSrc, MSG_THREAD_VIEW_S *pThreadInfo)
{
- memcpy(pThreadInfo, pSrc, sizeof(MSG_THREAD_VIEW_S));
+ memcpy(pThreadInfo, pSrc, sizeof(char)*2);
}
/* Event Encoder */