* [PATCH 1/2] Fix using wrong argument in test-serial @ 2010-08-16 11:13 Luiz Augusto von Dentz 2010-08-16 11:13 ` [PATCH 2/2] Fix not storing tty id on pnatd plugin Luiz Augusto von Dentz 2010-08-16 11:22 ` [PATCH 1/2] Fix using wrong argument in test-serial Johan Hedberg 0 siblings, 2 replies; 4+ messages in thread From: Luiz Augusto von Dentz @ 2010-08-16 11:13 UTC (permalink / raw) To: linux-bluetooth From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com> --- test/test-serial | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/test/test-serial b/test/test-serial index ed151dc..cc496df 100755 --- a/test/test-serial +++ b/test/test-serial @@ -29,7 +29,7 @@ if (len(args) < 1): print "Usage: %s <address> [service]" % (sys.argv[0]) sys.exit(1) -address = sys.argv[0] +address = args[0] if (len(args) < 2): service = "spp" -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] Fix not storing tty id on pnatd plugin 2010-08-16 11:13 [PATCH 1/2] Fix using wrong argument in test-serial Luiz Augusto von Dentz @ 2010-08-16 11:13 ` Luiz Augusto von Dentz 2010-08-16 11:23 ` Johan Hedberg 2010-08-16 11:22 ` [PATCH 1/2] Fix using wrong argument in test-serial Johan Hedberg 1 sibling, 1 reply; 4+ messages in thread From: Luiz Augusto von Dentz @ 2010-08-16 11:13 UTC (permalink / raw) To: linux-bluetooth From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com> The code used to create the port stored the id in a local variable instead of storing it in the client data which is used to release the port once disconnected. --- plugins/pnat.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/pnat.c b/plugins/pnat.c index f9136a4..3f5222f 100644 --- a/plugins/pnat.c +++ b/plugins/pnat.c @@ -238,7 +238,7 @@ static gboolean create_tty(struct dun_server *server) { struct dun_client *client = &server->client; struct rfcomm_dev_req req; - int dev, sk = g_io_channel_unix_get_fd(client->io); + int sk = g_io_channel_unix_get_fd(client->io); memset(&req, 0, sizeof(req)); req.dev_id = -1; @@ -251,13 +251,14 @@ static gboolean create_tty(struct dun_server *server) BT_IO_OPT_DEST_CHANNEL, &req.channel, BT_IO_OPT_INVALID); - dev = ioctl(sk, RFCOMMCREATEDEV, &req); - if (dev < 0) { + client->tty_id = ioctl(sk, RFCOMMCREATEDEV, &req); + if (client->tty_id < 0) { error("Can't create RFCOMM TTY: %s", strerror(errno)); return FALSE; } - snprintf(client->tty_name, PATH_MAX - 1, "/dev/rfcomm%d", dev); + snprintf(client->tty_name, PATH_MAX - 1, "/dev/rfcomm%d", + client->tty_id); client->tty_tries = TTY_TRIES; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] Fix not storing tty id on pnatd plugin 2010-08-16 11:13 ` [PATCH 2/2] Fix not storing tty id on pnatd plugin Luiz Augusto von Dentz @ 2010-08-16 11:23 ` Johan Hedberg 0 siblings, 0 replies; 4+ messages in thread From: Johan Hedberg @ 2010-08-16 11:23 UTC (permalink / raw) To: Luiz Augusto von Dentz; +Cc: linux-bluetooth Hi Luiz, On Mon, Aug 16, 2010, Luiz Augusto von Dentz wrote: > From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com> > > The code used to create the port stored the id in a local variable > instead of storing it in the client data which is used to release the > port once disconnected. Nice catch. The patch is now upstream. Johan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] Fix using wrong argument in test-serial 2010-08-16 11:13 [PATCH 1/2] Fix using wrong argument in test-serial Luiz Augusto von Dentz 2010-08-16 11:13 ` [PATCH 2/2] Fix not storing tty id on pnatd plugin Luiz Augusto von Dentz @ 2010-08-16 11:22 ` Johan Hedberg 1 sibling, 0 replies; 4+ messages in thread From: Johan Hedberg @ 2010-08-16 11:22 UTC (permalink / raw) To: Luiz Augusto von Dentz; +Cc: linux-bluetooth Hi Luiz, On Mon, Aug 16, 2010, Luiz Augusto von Dentz wrote: > From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com> > > --- > test/test-serial | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/test/test-serial b/test/test-serial > index ed151dc..cc496df 100755 > --- a/test/test-serial > +++ b/test/test-serial > @@ -29,7 +29,7 @@ if (len(args) < 1): > print "Usage: %s <address> [service]" % (sys.argv[0]) > sys.exit(1) > > -address = sys.argv[0] > +address = args[0] > > if (len(args) < 2): > service = "spp" The patch is now upstream. Thanks. Johan ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-16 11:23 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-08-16 11:13 [PATCH 1/2] Fix using wrong argument in test-serial Luiz Augusto von Dentz 2010-08-16 11:13 ` [PATCH 2/2] Fix not storing tty id on pnatd plugin Luiz Augusto von Dentz 2010-08-16 11:23 ` Johan Hedberg 2010-08-16 11:22 ` [PATCH 1/2] Fix using wrong argument in test-serial Johan Hedberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox