diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-10-07 20:10:11 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-10-07 20:10:11 +0200 |
commit | 1fdc889f14ad169adce8cdfd624a56c260ac7053 (patch) | |
tree | 991fa0f5df1378cb8e3b6e5bac18dc129a7255a6 | |
parent | 6d935efb1a315faaa5eb049e77d7d96f90be5cfb (diff) | |
download | connman-1fdc889f14ad169adce8cdfd624a56c260ac7053.tar.gz connman-1fdc889f14ad169adce8cdfd624a56c260ac7053.tar.bz2 connman-1fdc889f14ad169adce8cdfd624a56c260ac7053.zip |
rtnl: Remove unused operstate callback
-rw-r--r-- | include/rtnl.h | 7 | ||||
-rw-r--r-- | src/rtnl.c | 53 |
2 files changed, 0 insertions, 60 deletions
diff --git a/include/rtnl.h b/include/rtnl.h index 66bda850..a3789c9b 100644 --- a/include/rtnl.h +++ b/include/rtnl.h @@ -32,16 +32,9 @@ extern "C" { * @short_description: Functions for registering RTNL modules */ - -typedef void (* connman_rtnl_operstate_cb_t) (unsigned char operstate, - void *user_data); - typedef void (* connman_rtnl_link_cb_t) (unsigned flags, unsigned change, void *user_data); -unsigned int connman_rtnl_add_operstate_watch(int index, - connman_rtnl_operstate_cb_t callback, void *user_data); - unsigned int connman_rtnl_add_newlink_watch(int index, connman_rtnl_link_cb_t callback, void *user_data); @@ -48,7 +48,6 @@ struct watch_data { unsigned int id; int index; - connman_rtnl_operstate_cb_t operstate; connman_rtnl_link_cb_t newlink; void *user_data; }; @@ -148,45 +147,6 @@ static void read_uevent(struct interface_data *interface) } /** - * connman_rtnl_add_operstate_watch: - * @index: network device index - * @callback: callback function - * @user_data: callback data; - * - * Add a new RTNL watch for operation state events - * - * Returns: %0 on failure and a unique id on success - */ -unsigned int connman_rtnl_add_operstate_watch(int index, - connman_rtnl_operstate_cb_t callback, void *user_data) -{ - struct watch_data *watch; - - watch = g_try_new0(struct watch_data, 1); - if (watch == NULL) - return 0; - - watch->id = ++watch_id; - watch->index = index; - - watch->operstate = callback; - watch->user_data = user_data; - - watch_list = g_slist_prepend(watch_list, watch); - - DBG("id %d", watch->id); - - if (callback) { - unsigned char operstate = 0; - - if (operstate > 0) - callback(operstate, user_data); - } - - return watch->id; -} - -/** * connman_rtnl_add_newlink_watch: * @index: network device index * @callback: callback function @@ -454,9 +414,6 @@ static void process_newlink(unsigned short type, int index, unsigned flags, if (watch->index != index) continue; - if (operstate != 0xff && watch->operstate) - watch->operstate(operstate, watch->user_data); - if (watch->newlink) watch->newlink(flags, change, watch->user_data); } @@ -478,16 +435,6 @@ static void process_dellink(unsigned short type, int index, unsigned flags, ifname, index, operstate, operstate2str(operstate)); - for (list = watch_list; list; list = list->next) { - struct watch_data *watch = list->data; - - if (watch->index != index) - continue; - - if (operstate != 0xff && watch->operstate) - watch->operstate(operstate, watch->user_data); - } - for (list = rtnl_list; list; list = list->next) { struct connman_rtnl *rtnl = list->data; |