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 973dd36d30c6b435727776445b7ed7556d8d38a4..863a152eb341740abb07120a7a269c4aee234eaa 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 15496db22123d1774282c2fb5caef8416b5723c3..6116b1b419091994fb966b21f614bd80b9bc3fd4 100644 (file)
@@ -4,3 +4,4 @@ Description=VModem (x86)
 [Service]
 Type=simple
 ExecStart=/usr/bin/vmodem_x86
+Environment=VGSM_VERBOSE=12
index c818c62b6f1b159633b2c5bff18b4a938a7ffdb6..8430fd6c61d27c13b6ac1b9a5bef594b23debdbc 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";