[Title] DO NOT save the mms sent status values as a variable.
authorSooyoung Ha <yoosah.ha@samsung.com>
Wed, 15 May 2013 13:26:41 +0000 (22:26 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Wed, 15 May 2013 13:26:41 +0000 (22:26 +0900)
[Desc.] Because they are saved by vconfkey.

packaging/vmodemd-emul.spec
vmodem/server/client.c

index d5ad19247e37dc5cfa4365adfb501d2be99f75d5..1e4bbb099fc288522146d9c531beb2963e60c11c 100644 (file)
@@ -1,6 +1,6 @@
 #git:slp/pkgs/v/vmodem-daemon-emulator
 Name: vmodemd-emul
-Version: 0.2.45
+Version: 0.2.46
 Release: 1
 Summary: Modem Emulator
 Group: System/ModemEmulator
index bb24987143c23b3d8772ffb085b0bf7cfa2014c6..58fee1b5a348708f96c6bd8eaa219c500f1c6dd7 100644 (file)
@@ -92,6 +92,10 @@ extern GSM_StateMachine           GlobalS;
 #define MMI_SC_LENGTH2          14
 #define MMI_SC_LENGTH3          10
 
+#define MMS_SEND_OK            10
+#define MMS_SEND_FAIL          11
+#define MMS_MODIFIER           10
+
 #if 0
 static char * mmi_sc2[] =
 {
@@ -1057,11 +1061,12 @@ static void do_sms(PhoneServer * ps, TClientInfo * ci, LXT_MESSAGE * packet)
                break;
        case GSM_SMS_SEND_ACK_REQ:
                p = (unsigned char *)packet->data;
-               smsSentStatus = (int)p[0];
-               if(smsSentStatus == 10 || smsSentStatus == 11){
-                   sprintf(vconf_cmd, "vconftool set -t int memory/telephony/mms_sent_status %d -i -f", (smsSentStatus - 10));
+               if((int)p[0] == MMS_SEND_OK || (int)p[0] == MMS_SEND_FAIL){
+                   sprintf(vconf_cmd, "vconftool set -t int memory/telephony/mms_sent_status %d -i -f", ((int)p[0] - MMS_MODIFIER));
                    TRACE(MSGL_VGSM_INFO, "system : %s\n", vconf_cmd);
                    system(vconf_cmd);
+               } else {
+                   smsSentStatus = (int)p[0];
                }
 
                server_tx_sms_ReceiveAckMsg(packet);