fix some human faults 32/22932/1
authorSooyoung Ha <yoosah.ha@samsung.com>
Thu, 17 Oct 2013 07:46:47 +0000 (16:46 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Thu, 17 Oct 2013 08:17:52 +0000 (17:17 +0900)
Change-Id: I1af0eeaae59077d9cbfb4f450ead1569ef489891
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
lib/libsms/sms_tool.c
lib/libsms/sms_util.c
packaging/vmodemd-emul.spec
vmodem/db/db_phonebook.c
vmodem/server/eloop.c
vmodem/server/server.c

index 6502db7..23b876a 100644 (file)
@@ -991,18 +991,19 @@ BOOL EncodeSmsSubmitReportTpdu(unsigned char *packet, int *rawdata_len)
                        packet[index++] = tp_dcs;
                }
                /* TP-UDL */
+               /* This if statement couldn't be true because mask var is fixed to 0x69 on declaration.
                if ( mask & 0x04)
                {
                        submit_report.udl =0x00;
                        packet[index++] = submit_report.udl;
 
-                       /* TP-UD */
+                       // TP-UD
 
                        if (submit_report.dcs.alphabetType == TAPI_NETTEXT_ALPHABET_DEFAULT )
                        {
                                //SmsUtilPackGSMCode( packet + index, msg, msg_len);
                        }
-               }
+               } */
        }
 
        *rawdata_len = index;
index a7c3aa3..c008409 100644 (file)
@@ -401,12 +401,12 @@ void  SmsUtilDecodeAddrField_sca(char *diallingNum, unsigned char* pAddrField, i
                // when the length is 1, there are the only type and plan.
                if ( length > 1 )
                {
-                       dialnumLen = ( pAddrField[index++] - 1 ) * 2; // -1 is for TON/API field.
+                       dialnumLen = (int)( ( pAddrField[index++] - 1 ) * 2); // -1 is for TON/API field.
                }
        }
        else
        {
-               dialnumLen = ( ( ( pAddrField[index++] + 1 ) / 2 ) * 8 ) / 7;
+               dialnumLen = (int)( ( ( ( pAddrField[index++] + 1 ) / 2 ) * 8 ) / 7);
        }
 
        if ( dialnumLen > SIM_SMSP_ADDRESS_LEN )
index 59c067f..5df9ba9 100644 (file)
@@ -1,6 +1,6 @@
 #git:slp/pkgs/v/vmodem-daemon-emulator
 Name: vmodemd-emul
-Version: 0.2.50
+Version: 0.2.51
 Release: 1
 Summary: Modem Emulator
 Group: System/ModemEmulator
index 50fdfb9..9fb91f9 100644 (file)
@@ -749,7 +749,7 @@ int db_sim_pb_cnt_mgr(sqlite3 * db, int pb_type, int action)
        char str[1000];
        char str2[1000];
        char * mesg;
-       char tb_name[6];
+       char tb_name[7];
        int flag=0;
 
        SIM_DEBUG("\n");
index 9765a48..65bc30b 100644 (file)
@@ -275,7 +275,9 @@ static void main_iter(void)
 
     if (n == 0)
     {
-        invoke_timeout(timeout_head);
+       if(timeout_head) {
+           invoke_timeout(timeout_head);
+       }
     }
     else if (n > 0)
     {
index e8f46b4..158e689 100644 (file)
@@ -230,7 +230,7 @@ static int server_callback(PhoneServer * ps, int fd, EloopCondition cond, void *
 
        TRACE(MSGL_VGSM_INFO, "Client fd %d server fd %d\n", client_fd, server->fd);
 
-       if  (client_fd > 0)
+       if  (client_fd >= 0)
        {
                server->ci = malloc(sizeof (TClientInfo));
                server->ci->Functions = NULL;
@@ -338,7 +338,7 @@ static int server_inet_callback(PhoneServer * ps, int fd, EloopCondition cond, v
        return 1;
        */
 
-       if  (client_fd > 0)
+       if  (client_fd >= 0)
        {
                server->ci = malloc(sizeof (TClientInfo));
                server->ci->Functions = NULL;