diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-05-06 18:40:54 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-05-06 18:40:54 +0000 |
commit | 0adb4e98f284a3d6c4b6bc11599a8fe0be980126 (patch) | |
tree | 5d8f79440e2ebfe605a3cead5e5ef1a3cdb7491a /network | |
parent | 051c717bb6496f285c23c069582d520c581e8d45 (diff) |
Add some useful info calls for debugging.
Diffstat (limited to 'network')
-rw-r--r-- | network/bridge.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/network/bridge.c b/network/bridge.c index 2c8570e4..b2e61b65 100644 --- a/network/bridge.c +++ b/network/bridge.c @@ -54,7 +54,6 @@ int bridge_init(const char *gn_iface, const char *nap_iface) if (stat("/sys/module/bridge", &st) < 0) return -EOPNOTSUPP; #endif - bridge_socket = socket(AF_INET, SOCK_STREAM, 0); if (bridge_socket < 0) { error("Failed to open bridge socket: %s (%d)", @@ -64,6 +63,7 @@ int bridge_init(const char *gn_iface, const char *nap_iface) gn_bridge = gn_iface; nap_bridge = nap_iface; + return 0; } @@ -83,6 +83,8 @@ int bridge_create(int id) if (err < 0) return -errno; + info("bridge %s created", name); + return 0; } @@ -99,6 +101,8 @@ int bridge_remove(int id) if (err < 0) return -errno; + info("bridge %s removed", name); + return 0; } @@ -122,9 +126,7 @@ int bridge_add_interface(int id, const char *dev) if (err < 0) return err; - /* Only run scripts in GN bridges */ - if (id != BNEP_SVC_GN) - return 0; + info("bridge %s: interface %s added", name, dev); err = bnep_if_up(name, id); if (err < 0) |