eventListener->start();
+ int clientFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+
+ if (clientFd < 0)
+ return MSG_ERR_TRANSPORT_ERROR;
+
if (eventListener->regSentStatusEventCB(this, onStatusChanged, pUserParam) == false) // callback was already registered, just return SUCCESS
return MSG_SUCCESS;
// Copy Cookie
memcpy(pCmd->cmdCookie, mCookie, MAX_COOKIE_LEN);
- int listenerFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+ int listenerFd = clientFd;
MSG_DEBUG("remote fd %d", listenerFd);
eventListener->start();
+ int clientFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+
+ if (clientFd < 0)
+ return MSG_ERR_TRANSPORT_ERROR;
+
if (eventListener->regMessageIncomingEventCB(this, onMsgIncoming, port, pUserParam) == false) // callback was already registered, just return SUCCESS
return MSG_SUCCESS;
MSG_CMD_REG_INCOMING_MSG_CB_S cmdParam = {0};
- cmdParam.listenerFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+ cmdParam.listenerFd = clientFd;
cmdParam.msgType = MSG_SMS_TYPE;
cmdParam.port = port;
eventListener->start();
+ int clientFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+
+ if (clientFd < 0)
+ return MSG_ERR_TRANSPORT_ERROR;
+
if (eventListener->regMMSConfMessageIncomingEventCB(this, onMMSConfMsgIncoming, pAppId, pUserParam) == false) // callback was already registered, just return SUCCESS
return MSG_SUCCESS;
MSG_CMD_REG_INCOMING_MMS_CONF_MSG_CB_S cmdParam = {0};
- cmdParam.listenerFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+ cmdParam.listenerFd = clientFd;
cmdParam.msgType = MSG_MMS_TYPE;
if (pAppId)
eventListener->start();
+ int clientFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+
+ if (clientFd < 0)
+ return MSG_ERR_TRANSPORT_ERROR;
+
if (eventListener->regSyncMLMessageIncomingEventCB(this, onSyncMLMsgIncoming, pUserParam) == false) // callback was already registered, just return SUCCESS
return MSG_SUCCESS;
MSG_CMD_REG_INCOMING_SYNCML_MSG_CB_S cmdParam = {0};
- cmdParam.listenerFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+ cmdParam.listenerFd = clientFd;
cmdParam.msgType = MSG_SMS_TYPE;
memcpy((void*)((char*)pCmd+sizeof(MSG_CMD_TYPE_T)+MAX_COOKIE_LEN), &cmdParam, sizeof(cmdParam));
eventListener->start();
+ int clientFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+
+ if (clientFd < 0)
+ return MSG_ERR_TRANSPORT_ERROR;
+
if (eventListener->regLBSMessageIncomingEventCB(this, onLBSMsgIncoming, pUserParam) == false) // callback was already registered, just return SUCCESS
return MSG_SUCCESS;
MSG_CMD_REG_INCOMING_LBS_MSG_CB_S cmdParam = {0};
- cmdParam.listenerFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+ cmdParam.listenerFd = clientFd;
cmdParam.msgType = MSG_SMS_TYPE;
memcpy((void*)((char*)pCmd+sizeof(MSG_CMD_TYPE_T)+MAX_COOKIE_LEN), &cmdParam, sizeof(cmdParam));
eventListener->start();
+ int clientFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+
+ if (clientFd < 0)
+ return MSG_ERR_TRANSPORT_ERROR;
+
if (eventListener->regSyncMLMessageOperationEventCB(this, onSyncMLMsgOperation, pUserParam) == false) // callback was already registered, just return SUCCESS
return MSG_SUCCESS;
MSG_CMD_REG_SYNCML_MSG_OPERATION_CB_S cmdParam = {0};
- cmdParam.listenerFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+ cmdParam.listenerFd = clientFd;
cmdParam.msgType = MSG_SMS_TYPE;
memcpy((void*)((char*)pCmd+sizeof(MSG_CMD_TYPE_T)+MAX_COOKIE_LEN), &cmdParam, sizeof(cmdParam));
eventListener->start();
+ int clientFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+
+ if (clientFd < 0)
+ return MSG_ERR_TRANSPORT_ERROR;
+
if (eventListener->regPushMessageIncomingEventCB(this, onPushMsgIncoming, pAppId, pUserParam) == false) // callback was already registered, just return SUCCESS
return MSG_SUCCESS;
MSG_CMD_REG_INCOMING_PUSH_MSG_CB_S cmdParam = {0};
- cmdParam.listenerFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+ cmdParam.listenerFd = clientFd;
cmdParam.msgType = MSG_SMS_TYPE;
if (pAppId)
eventListener->start();
+ int clientFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+
+ if (clientFd < 0)
+ return MSG_ERR_TRANSPORT_ERROR;
+
if (eventListener->regCBMessageIncomingEventCB(this, onCBIncoming, bSave, pUserParam) == false) // callback was already registered, just return SUCCESS
return MSG_SUCCESS;
MSG_CMD_REG_CB_INCOMING_MSG_CB_S cmdParam = {0};
- cmdParam.listenerFd = eventListener->getRemoteFd(); // fd that is reserved to the "listener thread" by msgfw daemon
+ cmdParam.listenerFd = clientFd; // fd that is reserved to the "listener thread" by msgfw daemon
cmdParam.msgType = MSG_SMS_TYPE;
cmdParam.bsave = bSave;