fix bug of changed notification
authorYoungjae Shin <yj99.shin@samsung.com>
Wed, 23 Oct 2019 01:54:57 +0000 (10:54 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Wed, 18 Mar 2020 08:53:50 +0000 (17:53 +0900)
client/mdsc_noti_mode.c
include/modes.h

index ce35018..cb240f5 100644 (file)
@@ -29,7 +29,8 @@ static struct mdsc_noti_data_s mdsc_noti_data;
 
 static void _on_changed_mode(mdsDbus *mdsc_dbus, const char *mode, int state, gpointer user_data)
 {
-       RET_IF(NULL == user_data);
+       //TODO:: should support multi callback
+       //RET_IF(NULL == user_data);
 
        mdsc_noti_data.cb(mode, state, mdsc_noti_data.user_data);
 }
index 3438081..8a9a28b 100644 (file)
@@ -164,8 +164,7 @@ void modes_destroy_mode(modes_h mode);
  * @see modes_subscribe_mode_changes()
  * @see modes_unsubscribe_mode_changes()
  */
-typedef int(*modes_noti_fn) (const char *mode_name, int state, void *user_data);
-
+typedef int (*modes_noti_fn) (const char *mode_name, int state, void *user_data);
 /**
  * @brief Adds callback for recognizing the changed of mode.
  * @details Sets a function to be called when the mode is changed.