summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@indt.org.br>2008-08-14 18:42:19 -0300
committerLuiz Augusto von Dentz <luiz.dentz@indt.org.br>2008-08-14 18:42:19 -0300
commit9a82f7b06b55e26cd7c9920c2a31272b8db07aeb (patch)
tree368c736c871be01d9d3486c244697cf3e776f4d8 /network
parent28d37ba542086e44fbf172b5d5cb3b33557371aa (diff)
Fix unnecessary use of variable.
Diffstat (limited to 'network')
-rw-r--r--network/server.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/network/server.c b/network/server.c
index a8f13ca5..ec0c4900 100644
--- a/network/server.c
+++ b/network/server.c
@@ -552,7 +552,6 @@ static void connect_event(GIOChannel *chan, int err, const bdaddr_t *src,
const bdaddr_t *dst, gpointer user_data)
{
struct network_adapter *na = user_data;
- struct timeout *to = na->to;
if (err < 0) {
error("accept(): %s(%d)", strerror(errno), errno);
@@ -566,9 +565,9 @@ static void connect_event(GIOChannel *chan, int err, const bdaddr_t *src,
* user shall authorize the incomming connection before
* the time expires.
*/
- to = g_malloc0(sizeof(struct timeout));
- to->id = g_timeout_add(SETUP_TIMEOUT, timeout_cb, to);
- to->watch = g_io_add_watch_full(chan, G_PRIORITY_DEFAULT,
+ na->to = g_malloc0(sizeof(struct timeout));
+ na->to->id = g_timeout_add(SETUP_TIMEOUT, timeout_cb, na->to);
+ na->to->watch = g_io_add_watch_full(chan, G_PRIORITY_DEFAULT,
G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL,
bnep_setup, na, setup_destroy);
g_io_channel_unref(chan);