block all incoming calls when the incoming call barring is set
authorSooyoung Ha <yoosah.ha@samsung.com>
Tue, 23 Apr 2013 14:32:11 +0000 (23:32 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Tue, 23 Apr 2013 14:32:11 +0000 (23:32 +0900)
packaging/vmodemd-emul.spec
vmodem-x86.service
vmodem/server/server_tx_call.c

index 973dd36..863a152 100644 (file)
@@ -1,6 +1,6 @@
 #git:slp/pkgs/v/vmodem-daemon-emulator
 Name: vmodemd-emul
-Version: 0.2.42
+Version: 0.2.43
 Release: 1
 Summary: Modem Emulator
 Group: System/ModemEmulator
index 15496db..6116b1b 100644 (file)
@@ -4,3 +4,4 @@ Description=VModem (x86)
 [Service]
 Type=simple
 ExecStart=/usr/bin/vmodem_x86
+Environment=VGSM_VERBOSE=12
index c818c62..8430fd6 100644 (file)
@@ -364,6 +364,9 @@ int server_tx_call_incoming_noti( LXT_MESSAGE * packet ) //
        int call_exist = 0;  //  ÇöÀç call list¿¡, callÀÌ ¾ø´Ù¸é incoming noti Àü¼ÛÇÑ´Ù.
        unsigned short call_type;
 
+       int i;
+       call_barring_entry_t * resp_entry = get_call_barring_entry() ;
+
        TRACE(MSGL_VGSM_INFO, "\n");
 
        get_current_state_machine( &state );
@@ -428,6 +431,18 @@ int server_tx_call_incoming_noti( LXT_MESSAGE * packet ) //
        //090314
        callback_callist();
 
+       if(!resp_entry)
+               TRACE(MSGL_VGSM_INFO, "CB entry is NULL!!!\n");
+       else {
+               for(i=0; i<resp_entry[0].count; i++) {
+                       TRACE(MSGL_VGSM_INFO,"i : %d,  type : %d\n", i, resp_entry[i].type);
+                       if(resp_entry[i].type == 4 && resp_entry[i].ss_mode == 3) { // 'All incoming calls' has set
+                               TRACE(MSGL_VGSM_INFO, "no call. Incoming Call Barring is set \n");
+                               return -1;
+                       }
+               }
+       }
+
        char* number_type;
        if(number[0] == '+')
                number_type = "129";