summaryrefslogtreecommitdiffstats
path: root/serial
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2008-05-05 21:09:51 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2008-05-05 21:09:51 +0000
commit71c8ceab961dffc52b7dd4c814529083aede9c48 (patch)
tree07eabef7e3637b9c1370b4fbf5157723eb3a8fa5 /serial
parent4c169b8a996bf50ed843c8ddc926a5e1530923be (diff)
serial: remove RFCOMM_RELEASE_ONHUP flag and close the channel
Diffstat (limited to 'serial')
-rw-r--r--serial/manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/serial/manager.c b/serial/manager.c
index dc612b12..631158c9 100644
--- a/serial/manager.c
+++ b/serial/manager.c
@@ -360,13 +360,14 @@ static void rfcomm_connect_cb(GIOChannel *chan, int err_cb, gpointer user_data)
memset(&req, 0, sizeof(req));
req.dev_id = -1;
- req.flags = (1 << RFCOMM_REUSE_DLC) | (1 << RFCOMM_RELEASE_ONHUP);
+ req.flags = (1 << RFCOMM_REUSE_DLC);
bacpy(&req.src, &pc->src);
str2ba(pc->bda, &req.dst);
req.channel = pc->channel;
sk = g_io_channel_unix_get_fd(chan);
pc->id = ioctl(sk, RFCOMMCREATEDEV, &req);
+ g_io_channel_close(chan);
g_io_channel_unref(chan);
if (pc->id < 0) {
err = errno;