public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bluez-utils 3.36 hcid crashes if wrong script files in network.conf
@ 2009-01-23 14:48 ranaldo
  2009-01-28  5:51 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: ranaldo @ 2009-01-23 14:48 UTC (permalink / raw)
  To: linux-bluetooth

I'm sorry if this is not the right place to post this as the wiki and  
sourceforge project seems to be outdated.

On gentoo box a default network.conf file is installed from the  
sources in /etc/bluetooth.
The file itself has no problem but having avahi-autoipd as script,  
while in other distributions this is unset, evidences a problem in the  
function bnep_exec in network/common.c
If the script does not exists or bnep_exec fails for other reasons,  
hcid crashes for a very trivial mistake in the log error call.

Here a simple patch to fix this issue:

--- network/common.c    2009-01-23 15:52:12.000000000 +0100
+++ network/common.c    2009-01-23 15:45:47.000000000 +0100
@@ -235,7 +235,7 @@

         if (!g_spawn_async(NULL, (char **) argv, NULL, flags,  
bnep_setup, NULL,
                                 &pid, NULL)) {
-               error("Unable to execute %s %s", *argv[0], *argv[1]);
+               error("Unable to execute %s %s", argv[0], argv[1]);
                 return -EINVAL;
         }

I know that 3.36 should be the last in the 3.* series, however as  
there are a lot of distros using it, and as the same problem could  
affect 4.* series too i preferred to report this upstream.

The last thing, again about network.conf shipped file, the line:
#Disable=Connection,Server
should be
#Disable=Connection;Server
as who ignores the syntax of the conf file may not guess to use the  
";" instead of "," .

Best Regards

      Nicola Ranaldo



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-28  5:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-23 14:48 [PATCH] bluez-utils 3.36 hcid crashes if wrong script files in network.conf ranaldo
2009-01-28  5:51 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox