summaryrefslogtreecommitdiff
path: root/vswitchd
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-09-15 11:21:23 -0700
committerEthan Jackson <ethan@nicira.com>2011-09-16 11:22:30 -0700
commit2ee6545f2bff7eb27e8c84965e3ff38dfa909bf6 (patch)
treeb44933567bdbe6f6e12838661c31876e91c47f0b /vswitchd
parent18a237816419e6f88ab0383b43d8060914d26a9a (diff)
downloadopenvswitch-2ee6545f2bff7eb27e8c84965e3ff38dfa909bf6.tar.gz
notifiers: Create and destroy nln_notifiers.
This patch changes the interface of netlink-notifier and rtnetlink-link. Now nln_notifiers are allocated and destroyed by the module instead of passed in by callers. This allows the definition of nln_notifier to be hidden, and generally cleans up the code.
Diffstat (limited to 'vswitchd')
-rw-r--r--vswitchd/ovs-brcompatd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/vswitchd/ovs-brcompatd.c b/vswitchd/ovs-brcompatd.c
index df2b75dad..3cb1cfc62 100644
--- a/vswitchd/ovs-brcompatd.c
+++ b/vswitchd/ovs-brcompatd.c
@@ -799,7 +799,7 @@ int
main(int argc, char *argv[])
{
extern struct vlog_module VLM_reconnect;
- struct nln_notifier link_notifier;
+ struct nln_notifier *link_notifier;
struct unixctl_server *unixctl;
int retval;
@@ -823,8 +823,7 @@ main(int argc, char *argv[])
"\"brcompat\" kernel module.");
}
-
- rtnetlink_link_notifier_register(&link_notifier, netdev_changed_cb, NULL);
+ link_notifier = rtnetlink_link_notifier_create(netdev_changed_cb, NULL);
daemonize_complete();
@@ -842,7 +841,7 @@ main(int argc, char *argv[])
poll_block();
}
- rtnetlink_link_notifier_unregister(&link_notifier);
+ rtnetlink_link_notifier_destroy(link_notifier);
return 0;
}