check return value of bundle_get_val 22/62122/2 accepted/tizen/common/20160321.145920 accepted/tizen/ivi/20160321.004617 accepted/tizen/ivi/20160322.023149 accepted/tizen/mobile/20160321.004517 accepted/tizen/tv/20160321.004539 accepted/tizen/wearable/20160321.004558 submit/tizen/20160318.074817 submit/tizen_ivi/20160322.020156
authorJiwoong Im <jiwoong.im@samsung.com>
Mon, 14 Mar 2016 11:11:46 +0000 (20:11 +0900)
committerSemun Lee <sm79.lee@samsung.com>
Wed, 16 Mar 2016 13:20:57 +0000 (06:20 -0700)
Change-Id: I4791f876766867ecf6cedf29c899a93fa114ae26
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
src/esd_main.c

index b3c7732..f627068 100644 (file)
@@ -779,17 +779,17 @@ static void __esd_launch_event_handler(char *event_name, bundle *data, void *use
                if (strcmp(SYS_EVENT_BATTERY_CHARGER_STATUS, event_name) == 0) {
                        val = bundle_get_val(data, EVT_KEY_BATTERY_CHARGER_STATUS);
                        _D("charger val(%s)", val);
-                       if (strcmp(EVT_VAL_BATTERY_CHARGER_CONNECTED, val) != 0)
+                       if (val && (strcmp(EVT_VAL_BATTERY_CHARGER_CONNECTED, val) != 0))
                                return;
                } else if (strcmp(SYS_EVENT_USB_STATUS, event_name) == 0) {
                        val = bundle_get_val(data, EVT_KEY_USB_STATUS);
                        _D("usb val(%s)", val);
-                       if (strcmp(EVT_VAL_USB_CONNECTED, val) != 0)
+                       if (val && (strcmp(EVT_VAL_USB_CONNECTED, val) != 0))
                                return;
                } else if (strcmp(SYS_EVENT_EARJACK_STATUS, event_name) == 0) {
                        val = bundle_get_val(data, EVT_KEY_EARJACK_STATUS);
                        _D("earjack val(%s)", val);
-                       if (strcmp(EVT_VAL_EARJACK_CONNECTED, val) != 0)
+                       if (val && (strcmp(EVT_VAL_EARJACK_CONNECTED, val) != 0))
                                return;
                } else if (strcmp(SYS_EVENT_INCOMMING_MSG, event_name) == 0) {
                        msg_type = bundle_get_val(data, EVT_KEY_MSG_TYPE);