Skip to contentSkip to conversation

[Bluez-devel] [PATCH]

PATCH In review Filippo Giunchedi 2 participants 5 messages Dec 20, 2005 – Dec 21, 2005 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 [Bluez-devel] [PATCH]

Hi,
dbus 0.60 has removed the DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT flag for dbus_bus_request_name and now that is the default behaviour, the following patch should work:

dbus.c (working copy) renamed from dbus.c (revision 116) +1 -1
@@ -874,7 +874,7 @@
        dbus_connection_set_exit_on_disconnect(connection, FALSE);
 
        dbus_bus_request_name(connection, BASE_INTERFACE,
-                               DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT, &error);
+                               0, &error);
 
        if (dbus_error_is_set(&error)) {
                syslog(LOG_ERR, "Can't get system message bus name: %s",

unfortunately I can't find a DBUS_VERSION #define to be backward compatible with dbus < 0.60

filippo

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi Filippo,

Quoted 17 lines

dbus 0.60 has removed the DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT flag for dbus_bus_request_name and now that is the default behaviour, the following patch should work:

dbus.c (working copy) renamed from dbus.c (revision 116) +1 -1
@@ -874,7 +874,7 @@
        dbus_connection_set_exit_on_disconnect(connection, FALSE);
 
        dbus_bus_request_name(connection, BASE_INTERFACE,
-                               DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT, &error);
+                               0, &error);
 
        if (dbus_error_is_set(&error)) {
                syslog(LOG_ERR, "Can't get system message bus name: %s",
Quoted 2 lines

unfortunately I can't find a DBUS_VERSION #define to be backward compatible with dbus < 0.60

when D-Bus 1.0 has been released, I am going to drop support for older versions anyway. However what you need to add is something like:

#ifndef DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT
#define DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT 0x00
#endif

This will work perfect instead of using your patch and is still backward compatible.

Regards

Marcel

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#2 lore raw
Quoted 9 lines · Marcel Holtmann

when D-Bus 1.0 has been released, I am going to drop support for older versions anyway. However what you need to add is something like:

#ifndef DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT
#define DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT 0x00
#endif

This will work perfect instead of using your patch and is still backward compatible.

that's right! thank you, are you going to merge the above define into the next release of bluez?

filippo

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#3 lore raw

Hi Filippo,

Quoted 7 lines
Quoted 7 lines

when D-Bus 1.0 has been released, I am going to drop support for older versions anyway. However what you need to add is something like:

#ifndef DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT
#define DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT 0x00
#endif

Quoted 5 lines
Quoted 2 lines

This will work perfect instead of using your patch and is still backward compatible.

that's right! thank you, are you going to merge the above define into the next release of bluez?

it is already in the CVS. However I have some people doing the following transition (instead of no flags):

DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT -> DBUS_NAME_FLAG_DO_NOT_QUEUE

Any comments on this?

Regards

Marcel

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#4 lore raw
Quoted 6 lines · Marcel Holtmann

it is already in the CVS. However I have some people doing the following transition (instead of no flags):

DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT -> DBUS_NAME_FLAG_DO_NOT_QUEUE

Any comments on this?

I think it makes sense not to wait for dbus name, so DBUS_NAME_FLAG_DO_NOT_QUEUE makes sense

filippo

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel