Modify flora license version.
[platform/core/messaging/msg-service.git] / plugin / sms_plugin / SmsPluginSatHandler.cpp
1 /*
2 * Copyright 2012-2013  Samsung Electronics Co., Ltd
3 *
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *    http://floralicense.org/license/
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include "MsgDebug.h"
18 #include "MsgCppTypes.h"
19 #include "MsgException.h"
20 #include "MsgGconfWrapper.h"
21 #include "SmsPluginParamCodec.h"
22 #include "SmsPluginUDCodec.h"
23 #include "SmsPluginSetting.h"
24 #include "SmsPluginTransport.h"
25 #include "SmsPluginCallback.h"
26 #include "SmsPluginEventHandler.h"
27 #include "SmsPluginSatHandler.h"
28
29 extern "C"
30 {
31         #include <tapi_common.h>
32         #include <TelSms.h>
33         #include <TapiUtility.h>
34         #include <ITapiNetText.h>
35         #include <ITapiSat.h>
36 }
37
38 extern struct tapi_handle *pTapiHandle;
39 /*==================================================================================================
40                                      IMPLEMENTATION OF SmsPluginCbMsgHandler - Member Functions
41 ==================================================================================================*/
42 SmsPluginSatHandler* SmsPluginSatHandler::pInstance = NULL;
43
44
45 SmsPluginSatHandler::SmsPluginSatHandler()
46 {
47         commandId = 0;
48
49         bSendSms = false;
50         bInitSim = false;
51         bSMSPChanged = false;
52         bCBMIChanged = false;
53 }
54
55
56 SmsPluginSatHandler::~SmsPluginSatHandler()
57 {
58
59 }
60
61
62 SmsPluginSatHandler* SmsPluginSatHandler::instance()
63 {
64         if (!pInstance)
65                 pInstance = new SmsPluginSatHandler();
66
67         return pInstance;
68 }
69
70
71 void SmsPluginSatHandler::refreshSms(void *pData)
72 {
73         /*
74         TelSatRefreshInd_t* pRefreshData = (TelSatRefreshInd_t*)pData;
75
76         if (pRefreshData->appType != TAPI_SAT_REFRESH_MSG)
77         {
78                 MSG_DEBUG("App Type is wrong. [%d]", pRefreshData->appType);
79                 return;
80         }
81
82         commandId = pRefreshData->commandId;
83
84         switch (pRefreshData->refreshMode)
85         {
86                 case TAPI_SAT_REFRESH_SIM_INIT_AND_FULL_FCN :
87                 case TAPI_SAT_REFRESH_SIM_INIT_AND_FCN :
88                 {
89                         for (int i = 0; i < pRefreshData->fileCount; i++)
90                         {
91                                 if ((SMS_SIM_EFILE_NAME_T)pRefreshData->fileId[i].FileName == SMS_SIM_EFILE_USIM_SMSP ||
92                                         (SMS_SIM_EFILE_NAME_T)pRefreshData->fileId[i].FileName == SMS_SIM_EFILE_SMSP)
93                                 {
94                                         bSMSPChanged = true;
95                                 }
96                                 else if ((SMS_SIM_EFILE_NAME_T)pRefreshData->fileId[i].FileName == SMS_SIM_EFILE_USIM_CBMI ||
97                                         (SMS_SIM_EFILE_NAME_T)pRefreshData->fileId[i].FileName == SMS_SIM_EFILE_CBMI)
98                                 {
99                                         bCBMIChanged = true;
100                                 }
101                         }
102
103                         initSim();
104                 }
105                 break;
106
107                 case TAPI_SAT_REFRESH_FCN :
108                 {
109                         for (int i = 0; i < pRefreshData->fileCount; i++)
110                         {
111                                 if ((SMS_SIM_EFILE_NAME_T)pRefreshData->fileId[i].FileName == SMS_SIM_EFILE_USIM_SMSP ||
112                                         (SMS_SIM_EFILE_NAME_T)pRefreshData->fileId[i].FileName == SMS_SIM_EFILE_SMSP)
113                                 {
114                                         bSMSPChanged = true;
115                                 }
116                                 else if ((SMS_SIM_EFILE_NAME_T)pRefreshData->fileId[i].FileName == SMS_SIM_EFILE_USIM_CBMI ||
117                                         (SMS_SIM_EFILE_NAME_T)pRefreshData->fileId[i].FileName == SMS_SIM_EFILE_CBMI)
118                                 {
119                                         bCBMIChanged = true;
120                                 }
121                         }
122                 }
123                 break;
124
125                 case TAPI_SAT_REFRESH_SIM_INIT :
126                 {
127                         initSim();
128                 }
129                 break;
130
131                 default:
132                 break;
133         }
134         */
135 }
136
137
138 void SmsPluginSatHandler::sendSms(void *pData)
139 {
140         TelSatSendSmsIndSmsData_t* pSmsData = (TelSatSendSmsIndSmsData_t*)pData;
141
142         bSendSms = true;
143
144         commandId = pSmsData->commandId;
145
146         MSG_DEBUG("commandId [%d]", commandId);
147
148         // The TPDU Maximum Length at SAT side is 175
149         // This is because Sat can send 160 bytes unpacked and header
150         unsigned char tpdu[MAX_SAT_TPDU_LEN+1];
151         int tpduLen = 0;
152
153         memset(tpdu, 0x00, sizeof(tpdu));
154         memcpy(tpdu, pSmsData->smsTpdu.data, pSmsData->smsTpdu.dataLen);
155
156         // Modify Parameters, Pack User Data
157         tpduLen = handleSatTpdu(tpdu, pSmsData->smsTpdu.dataLen, pSmsData->bIsPackingRequired);
158
159         if (tpduLen <= 0 || tpduLen > MAX_TPDU_DATA_LEN)
160         {
161                 sendResult(SMS_SAT_CMD_SEND_SMS, TAPI_SAT_R_BEYOND_ME_CAPABILITIES);
162                 return;
163         }
164
165         // Make Telephony Structure
166         TelSmsDatapackageInfo_t pkgInfo;
167
168         // Set TPDU data
169         memset((void*)pkgInfo.szData, 0x00, sizeof(pkgInfo.szData));
170         memcpy((void*)pkgInfo.szData, tpdu, tpduLen);
171
172         pkgInfo.szData[tpduLen - 1] = '\0';
173         pkgInfo.MsgLength = tpduLen;
174
175         // Set SMSC Address
176         SMS_ADDRESS_S smsc;
177
178         if (pSmsData->address.diallingNumberLen > 0)
179         {
180                 smsc.ton = pSmsData->address.ton;
181                 smsc.npi = pSmsData->address.npi;
182                 memcpy(smsc.address, pSmsData->address.diallingNumber, pSmsData->address.diallingNumberLen);
183                 smsc.address[pSmsData->address.diallingNumberLen] = '\0';
184
185                 MSG_DEBUG("SCA TON[%d], NPI[%d], LEN[%d], ADDR[%s]", smsc.ton, smsc.npi, strlen(smsc.address), smsc.address);
186         }
187         else
188         {
189                 // Set SMSC Options
190                 SmsPluginTransport::instance()->setSmscOptions(&smsc);
191         }
192
193         unsigned char smscAddr[MAX_SMSC_LEN];
194         memset(smscAddr, 0x00, sizeof(smscAddr));
195
196         int smscLen = SmsPluginParamCodec::encodeSMSC(&smsc, smscAddr);
197
198         if (smscLen <= 0) return;
199
200         // Set SMSC Address
201         memset(pkgInfo.Sca, 0x00, sizeof(pkgInfo.Sca));
202         memcpy((void*)pkgInfo.Sca, smscAddr, smscLen);
203         pkgInfo.Sca[smscLen] = '\0';
204
205         int tapiRet = TAPI_API_SUCCESS;
206
207         // Send SMS
208         tapiRet = tel_send_sms(pTapiHandle, &pkgInfo, 0, TapiEventSentStatus, NULL);
209
210         if (tapiRet == TAPI_API_SUCCESS)
211         {
212                 MSG_DEBUG("########  TelTapiSmsSend Success !!! return : %d #######", tapiRet);
213         }
214         else
215         {
216                 MSG_DEBUG("########  TelTapiSmsSend Fail !!! return : %d #######", tapiRet);
217                 sendResult(SMS_SAT_CMD_SEND_SMS, TAPI_SAT_R_BEYOND_ME_CAPABILITIES);
218         }
219 }
220
221
222 void SmsPluginSatHandler::ctrlSms(void *pData)
223 {
224         TelSatMoSmCtrlIndData_t* pCtrlData = (TelSatMoSmCtrlIndData_t*)pData;
225
226         if (bSendSms == true) // Send SMS By SAT
227         {
228                 if (pCtrlData->moSmsCtrlResult == TAPI_SAT_CALL_CTRL_R_NOT_ALLOWED)
229                 {
230                         MSG_DEBUG("SIM does not allow to send SMS");
231
232                         sendResult(SMS_SAT_CMD_SEND_SMS, TAPI_SAT_R_INTRCTN_WITH_CC_OR_SMS_CTRL_PRMNT_PRBLM);
233                 }
234                 else if (pCtrlData->moSmsCtrlResult == TAPI_SAT_CALL_CTRL_R_ALLOWED_WITH_MOD)
235                 {
236                         MSG_DEBUG("SIM allows to send SMS with modification");
237
238                         sendResult(SMS_SAT_CMD_SEND_SMS, TAPI_SAT_R_SUCCESS);
239                 }
240         }
241         else // Send SMS By APP
242         {
243                 msg_network_status_t netStatus = MSG_NETWORK_NOT_SEND;
244
245                 if (pCtrlData->moSmsCtrlResult == TAPI_SAT_CALL_CTRL_R_NOT_ALLOWED)
246                 {
247                         MSG_DEBUG("SIM does not allow to send SMS");
248
249                         netStatus = MSG_NETWORK_SEND_FAIL;
250                 }
251                 else if (pCtrlData->moSmsCtrlResult == TAPI_SAT_CALL_CTRL_R_ALLOWED_WITH_MOD)
252                 {
253                         MSG_DEBUG("SIM allows to send SMS with modification");
254
255                         netStatus = MSG_NETWORK_SEND_SUCCESS;
256                 }
257
258                 // Call Event Handler
259                 SmsPluginEventHandler::instance()->handleSentStatus(netStatus);
260         }
261 }
262
263
264 void SmsPluginSatHandler::ctrlSms(msg_network_status_t netStatus)
265 {
266         if (bSendSms == true) // Send SMS By SAT
267         {
268                 if (netStatus == MSG_NETWORK_SEND_SUCCESS)
269                 {
270                         MSG_DEBUG("Sending SMS by SAT is OK");
271
272                         sendResult(SMS_SAT_CMD_SEND_SMS, TAPI_SAT_R_SUCCESS);
273                 }
274                 else if (netStatus == MSG_NETWORK_SEND_FAIL)
275                 {
276                         MSG_DEBUG("Sending SMS by SAT is failed");
277
278                         sendResult(SMS_SAT_CMD_SEND_SMS, TAPI_SAT_R_SMS_RP_ERROR);
279                 }
280         }
281 }
282
283
284 void SmsPluginSatHandler::finishSimMsgInit(msg_error_t Err)
285 {
286         // SAT Handler is initializing SIM now
287         if (bInitSim == true)
288         {
289                 // Init SMSC List and CB ID Info
290                 try
291                 {
292                         if (bSMSPChanged == true) initSMSCList();
293                 }
294                 catch (MsgException& e)
295                 {
296                         // Send Result to TAPI
297                         sendResult(SMS_SAT_CMD_REFRESH, TAPI_SAT_R_ME_UNABLE_TO_PROCESS_COMMAND);
298
299                         MSG_FATAL("%s", e.what());
300                         return;
301                 }
302
303                 try
304                 {
305                         if (bCBMIChanged == true) initCBConfig();
306                 }
307                 catch (MsgException& e)
308                 {
309                         // Send Result to TAPI
310                         sendResult(SMS_SAT_CMD_REFRESH, TAPI_SAT_R_ME_UNABLE_TO_PROCESS_COMMAND);
311
312                         MSG_FATAL("%s", e.what());
313                         return;
314                 }
315
316                 // Send Result to TAPI
317                 sendResult(SMS_SAT_CMD_REFRESH, TAPI_SAT_R_SUCCESS);
318         }
319 }
320
321
322 void SmsPluginSatHandler::initSim()
323 {
324         bInitSim = true;
325
326         // Init SIM Message
327         if (SmsPluginEventHandler::instance()->callbackInitSimBySat() != MSG_SUCCESS)
328         {
329                 MSG_DEBUG("Init Sim Error");
330
331                 // Send Result to TAPI
332                 sendResult(SMS_SAT_CMD_REFRESH, TAPI_SAT_R_ME_UNABLE_TO_PROCESS_COMMAND);
333         }
334 }
335
336
337 void    SmsPluginSatHandler::initSMSCList()
338 {
339         MSG_SETTING_S settingData;
340
341         settingData.type = MSG_SMSC_LIST;
342
343         // Get Data From SIM
344         SmsPluginSetting::instance()->getConfigData(&settingData);
345
346         MSG_DEBUG("total_count[%d]", settingData.option.smscList.totalCnt);
347         MSG_DEBUG("selected[%d]", settingData.option.smscList.selected);
348
349         for (int i = 0; i < settingData.option.smscList.totalCnt; i++)
350         {
351                 MSG_DEBUG("pid[%d]", settingData.option.smscList.smscData[i].pid);
352 //              MSG_DEBUG("dcs[%d]", settingData.option.smscList.smscData[i].dcs);
353                 MSG_DEBUG("val_period[%d]", settingData.option.smscList.smscData[i].valPeriod);
354                 MSG_DEBUG("name[%s]", settingData.option.smscList.smscData[i].name);
355
356                 MSG_DEBUG("ton[%d]", settingData.option.smscList.smscData[i].smscAddr.ton);
357                 MSG_DEBUG("npi[%d]", settingData.option.smscList.smscData[i].smscAddr.npi);
358                 MSG_DEBUG("address[%s]", settingData.option.smscList.smscData[i].smscAddr.address);
359         }
360
361         if (MsgSettingSetInt(SMSC_SELECTED, settingData.option.smscList.selected) != MSG_SUCCESS)
362         {
363                 THROW(MsgException::SMS_PLG_ERROR, "Error to set config data [%s]", SMSC_SELECTED);
364                 return;
365         }
366
367         if (MsgSettingSetInt(SMSC_TOTAL_COUNT, settingData.option.smscList.totalCnt) != MSG_SUCCESS)
368         {
369                 THROW(MsgException::SMS_PLG_ERROR, "Error to set config data [%s]", SMSC_TOTAL_COUNT);
370                 return;
371         }
372
373         char keyName[128];
374         msg_error_t err = MSG_SUCCESS;
375
376         for (int i = 0; i < settingData.option.smscList.totalCnt; i++)
377         {
378                 memset(keyName, 0x00, sizeof(keyName));
379                 sprintf(keyName, "%s/%d", SMSC_PID, i);
380
381                 if ((err = MsgSettingSetInt(keyName, (int)settingData.option.smscList.smscData[i].pid)) != MSG_SUCCESS)
382                         break;
383
384 #if 0
385                 memset(keyName, 0x00, sizeof(keyName));
386                 sprintf(keyName, "%s/%d", SMSC_DCS, i);
387
388                 if ((err = MsgSettingSetInt(keyName, (int)settingData.option.smscList.smscData[i].dcs)) != MSG_SUCCESS)
389                         break;
390 #endif
391
392                 memset(keyName, 0x00, sizeof(keyName));
393                 sprintf(keyName, "%s/%d", SMSC_VAL_PERIOD, i);
394
395                 if ((err = MsgSettingSetInt(keyName, (int)settingData.option.smscList.smscData[i].valPeriod)) != MSG_SUCCESS)
396                         break;
397
398                 memset(keyName, 0x00, sizeof(keyName));
399                 sprintf(keyName, "%s/%d", SMSC_NAME, i);
400
401                 if ((err = MsgSettingSetString(keyName, settingData.option.smscList.smscData[i].name)) != MSG_SUCCESS)
402                         break;
403
404                 memset(keyName, 0x00, sizeof(keyName));
405                 sprintf(keyName, "%s/%d", SMSC_TON, i);
406
407                 if ((err = MsgSettingSetInt(keyName, (int)settingData.option.smscList.smscData[i].smscAddr.ton)) != MSG_SUCCESS)
408                         break;
409
410                 memset(keyName, 0x00, sizeof(keyName));
411                 sprintf(keyName, "%s/%d", SMSC_NPI, i);
412
413                 if ((err = MsgSettingSetInt(keyName, (int)settingData.option.smscList.smscData[i].smscAddr.npi)) != MSG_SUCCESS)
414                         break;
415
416                 memset(keyName, 0x00, sizeof(keyName));
417                 sprintf(keyName, "%s/%d", SMSC_ADDRESS, i);
418
419                 if ((err = MsgSettingSetString(keyName, settingData.option.smscList.smscData[i].smscAddr.address)) != MSG_SUCCESS)
420                         break;
421         }
422
423         if (err != MSG_SUCCESS)
424         {
425                 THROW(MsgException::SMS_PLG_ERROR, "Error to set config data [%s]", keyName);
426         }
427 }
428
429
430 void    SmsPluginSatHandler::initCBConfig()
431 {
432         MSG_SETTING_S settingData;
433
434         settingData.type = MSG_CBMSG_OPT;
435
436         // Get Data From SIM
437         SmsPluginSetting::instance()->getConfigData(&settingData);
438
439         if (MsgSettingSetBool(CB_RECEIVE, settingData.option.cbMsgOpt.bReceive) != MSG_SUCCESS)
440         {
441                 THROW(MsgException::SMS_PLG_ERROR, "Error to set config data [%s]", CB_RECEIVE);
442                 return;
443         }
444
445         if (MsgSettingSetInt(CB_MAX_SIM_COUNT, settingData.option.cbMsgOpt.maxSimCnt) != MSG_SUCCESS)
446         {
447                 THROW(MsgException::SMS_PLG_ERROR, "Error to set config data [%s]", CB_MAX_SIM_COUNT);
448                 return;
449         }
450
451         if (MsgSettingSetInt(CB_CHANNEL_COUNT, settingData.option.cbMsgOpt.channelData.channelCnt) != MSG_SUCCESS)
452         {
453                 THROW(MsgException::SMS_PLG_ERROR, "Error to set config data [%s]", CB_CHANNEL_COUNT);
454                 return;
455         }
456
457         char keyName[128];
458         msg_error_t err = MSG_SUCCESS;
459
460         for (int i = 0; i < settingData.option.cbMsgOpt.channelData.channelCnt; i++)
461         {
462                 memset(keyName, 0x00, sizeof(keyName));
463                 sprintf(keyName, "%s/%d", CB_CHANNEL_ACTIVATE, i);
464
465                 if ((err = MsgSettingSetBool(keyName, settingData.option.cbMsgOpt.channelData.channelInfo[i].bActivate)) != MSG_SUCCESS)
466                         break;
467
468                 memset(keyName, 0x00, sizeof(keyName));
469                 sprintf(keyName, "%s/%d", CB_CHANNEL_ID_FROM, i);
470
471                 if ((err = MsgSettingSetInt(keyName, settingData.option.cbMsgOpt.channelData.channelInfo[i].from)) != MSG_SUCCESS)
472                         break;
473
474                 memset(keyName, 0x00, sizeof(keyName));
475                 sprintf(keyName, "%s/%d", CB_CHANNEL_ID_TO, i);
476
477                 if ((err = MsgSettingSetInt(keyName, settingData.option.cbMsgOpt.channelData.channelInfo[i].to)) != MSG_SUCCESS)
478                         break;
479
480                 memset(keyName, 0x00, sizeof(keyName));
481                 sprintf(keyName, "%s/%d", CB_CHANNEL_NAME, i);
482
483                 if ((err = MsgSettingSetString(keyName, settingData.option.cbMsgOpt.channelData.channelInfo[i].name)) != MSG_SUCCESS)
484                         break;
485         }
486
487         if (err != MSG_SUCCESS)
488         {
489                 THROW(MsgException::SMS_PLG_ERROR, "Error to set config data [%s]", keyName);
490         }
491 }
492
493
494 int SmsPluginSatHandler::handleSatTpdu(unsigned char *pTpdu, unsigned char TpduLen, int bIsPackingRequired)
495 {
496         if (pTpdu == NULL)
497                 THROW(MsgException::SMS_PLG_ERROR, "SAT TPDU is NULL");
498
499         int pos = 0;
500
501         // TP-MTI, TP-RD, TP-VPF,  TP-RP, TP-UDHI, TP-SRR
502         // TP-VPF
503         SMS_VPF_T vpf = (SMS_VPF_T)(pTpdu[pos++] & 0x18) >> 3;
504
505         // TP-MR
506         unsigned char tmpRef = pTpdu[pos];
507
508         MSG_DEBUG("current Msg Ref : %d", tmpRef);
509
510         pTpdu[pos] = tmpRef + 1;
511
512         MSG_DEBUG("new Msg Ref : %d", pTpdu[pos]);
513
514         pos++;
515
516 //      pTpdu[pos++] = SmsPluginTransport::instance()->getMsgRef();
517
518
519         // TP-DA
520         SMS_ADDRESS_S destAddr = {0};
521         int addrLen = SmsPluginParamCodec::decodeAddress(&pTpdu[pos], &destAddr);
522
523         pos += addrLen;
524
525         // TP-PID
526         pos++;
527
528         // TP-DCS
529         SMS_DCS_S dcs = {0};
530
531         int dcsLen = SmsPluginParamCodec::decodeDCS(&pTpdu[pos], &dcs);
532
533         if (bIsPackingRequired == true)
534         {
535                 dcs.codingScheme = SMS_CHARSET_7BIT;
536
537                 char* pDcs = NULL;
538                 AutoPtr<char> dcsBuf(&pDcs);
539
540                 SmsPluginParamCodec::encodeDCS(&dcs, &pDcs);
541
542                 memcpy(&(pTpdu[pos]), pDcs, dcsLen);
543         }
544
545         pos++;
546
547         // TP-VP
548         if (vpf == SMS_VPF_RELATIVE)
549         {
550                 pos += MAX_REL_TIME_PARAM_LEN;
551         }
552         else if (vpf == SMS_VPF_ABSOLUTE)
553         {
554                 pos += MAX_ABS_TIME_PARAM_LEN;
555         }
556
557         // TP-UDL
558         int udl = pTpdu[pos];
559         int retLen = 0;
560
561         if (bIsPackingRequired == true)
562         {
563                 SMS_USERDATA_S userData = {0};
564
565                 userData.headerCnt = 0;
566                 userData.length = udl;
567                 memcpy(userData.data, &pTpdu[pos+1], udl);
568                 userData.data[udl] = '\0';
569
570 MSG_DEBUG("user data : [%s]", userData.data);
571
572                 int encodeSize = SmsPluginUDCodec::encodeUserData(&userData, dcs.codingScheme, (char*)&pTpdu[pos]);
573
574                 retLen = pos + encodeSize;
575         }
576         else
577         {
578                 retLen = TpduLen;
579         }
580
581         return retLen;
582 }
583
584
585 void SmsPluginSatHandler::sendResult(SMS_SAT_CMD_TYPE_T CmdType, int ResultType)
586 {
587         TelSatAppsRetInfo_t satRetInfo;
588
589         satRetInfo.commandId = commandId;
590
591         MSG_DEBUG("satRetInfo.commandId [%d]", satRetInfo.commandId);
592
593         if (CmdType == SMS_SAT_CMD_REFRESH)
594         {
595                 satRetInfo.commandType = TAPI_SAT_CMD_TYPE_REFRESH;
596
597                 satRetInfo.appsRet.refresh.appType = TAPI_SAT_REFRESH_MSG;
598                 satRetInfo.appsRet.refresh.resp = (TelSatResultType_t)ResultType;
599         }
600         else if (CmdType == SMS_SAT_CMD_SEND_SMS)
601         {
602                 satRetInfo.commandType = TAPI_SAT_CMD_TYPE_SEND_SMS;
603
604                 satRetInfo.appsRet.sendSms.resp = (TelSatResultType_t)ResultType;
605         }
606
607         int tapiRet = TAPI_API_SUCCESS;
608
609         tapiRet = tel_send_sat_app_exec_result(pTapiHandle, &satRetInfo);
610
611         if (tapiRet == TAPI_API_SUCCESS)
612         {
613                 MSG_DEBUG("TelTapiSatSendAppExecutionResult() SUCCESS");
614         }
615         else
616         {
617                 MSG_DEBUG("TelTapiSatSendAppExecutionResult() FAIL [%d]", tapiRet);
618         }
619
620         bSendSms = false;
621         bInitSim = false;
622         bSMSPChanged = false;
623         bCBMIChanged = false;
624 }
625