kdbus

System Software

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
5.0
Description:

kdbus is a D-BUS service browser for KDE. Like kdcop, but for D-BUS instead.

kdbus is being developed in KDE SVN, at /trunk/playground/utils/kdbus .
Last changelog:

13 years ago

Fix compilation for dbus-0.50.

cRoMo

12 years ago

507:cromo@kromka:~$ kdbus
kdbus: On system bus
kdbus: Inspecting service org.freedesktop.DBus
kdbus: Inspecting service :1.8
kdbus: Inspecting service :1.9
kdbus: Inspecting service org.freedesktop.NetworkManagerInfo
kdbus: Inspecting service :1.10
kdbus: Inspecting service org.bluez
kdbus: Inspecting service :1.22
kdbus: Inspecting service org.freedesktop.NetworkManager
kdbus: Inspecting service com.redhat.dhcp
kdbus: Inspecting service :1.0
KCrash: Application 'kdbus' crashing...

Report

cRoMo

12 years ago

Ok, I found the solution myslef.
More here: https://bugs.launchpad.net/ubuntu/+source/kdbus/+bug/73780

Report

watzke

13 years ago

Nice app. Here is ebuild for Gentoo Portage:
http://david.klenot.cz/ebuilds/kdbus-0.8.6.ebuild

Report

deathmetal

13 years ago

Sorry for my triple posting, it seems, the browser submitted the form every time on reload :(

Report

neofreko

13 years ago

qdbusconnection.cpp:377: error: 'DBUS_NAME_FLAG_ALLOW_REPLACEMENT' was not declared in this scope

I've already installed dbus-devel. What else do I miss?

Thx

Report

neofreko

13 years ago

after a quick check (only God knows why hadn't I do this before), I found the answer:

[geek@toni kdbus-0.8.5]$ grep -R DBUS_NAME_FLAG /usr/include/dbus-1.0/dbus/
/usr/include/dbus-1.0/dbus/dbus-shared.h:#define DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT 0x1
/usr/include/dbus-1.0/dbus/dbus-shared.h:#define DBUS_NAME_FLAG_REPLACE_EXISTING 0x2

instead of ALLOW, it should be "not PROHIBIT" :)

Report

C

rohanpm

13 years ago

Thanks for the investigation. It turns out that particular macro changed name between dbus-0.50 and dbus-0.60. So, I take it you guys are trying to compile kdbus with dbus 0.50 or earlier :-)

In kdbus 0.8.6 I fixed it to compile with either dbus 0.50 or 0.60. dbus earlier than 0.50 is not supported.

Report

deathmetal

13 years ago

First of all, thanks to the developers, great work!

But: I got the same problem during compilation...

Here is the workaround:

According to http://dbus.freedesktop.org/doc/dbus-specification.html
DBUS_NAME_FLAG_ALLOW_REPLACEMENT has a value 0x1, and DBUS_NAME_FLAG_REPLACE_EXISTING (also used in qdbusconnection.cpp) 0x2.

So, add the following lines to kdbus-0.8.5/src/dbus-qt3-backport/dbus/qdbusconnection.h:

#ifndef DBUS_NAME_FLAG_ALLOW_REPLACEMENT
#define DBUS_NAME_FLAG_ALLOW_REPLACEMENT 0x1
#endif

#ifndef DBUS_NAME_FLAG_REPLACE_EXISTING
#define DBUS_NAME_FLAG_REPLACE_EXISTING 0x2
#endif

I know, this is, to say the least, a real dirty solution, but it works fine :)

Report

neofreko

13 years ago

and my patch:

//if (modeFlags & AllowReplace)
if (modeFlags & !AllowReplace)
//dbusFlags |= DBUS_NAME_FLAG_ALLOW_REPLACEMENT;
dbusFlags |= DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT;


it's kinda confusing me since the change is not only a name change but also a logical change. I'm not sure it will work as intended.

As you've said, the spec says DBUS_NAME_FLAG_ALLOW_REPLACEMENT uquals 0x1 but the implementation says it's DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT; that equals 0x1

Report

C

rohanpm

13 years ago

This is the patch I ended up making. Note that this probably makes no difference to anything, because this part of the code deals with whether or not another process can 'steal' kdbus's connection name, but kdbus doesn't use a named connection to dbus anyway.

--- src/dbus-qt3-backport/qdbusconnection.cpp (revision 510765)
+++ src/dbus-qt3-backport/qdbusconnection.cpp (working copy)
@@ -373,8 +373,15 @@
return false;

int dbusFlags = 0;
+#ifdef DBUS_NAME_FLAG_ALLOW_REPLACEMENT
if (modeFlags & AllowReplace)
dbusFlags |= DBUS_NAME_FLAG_ALLOW_REPLACEMENT;
+#elif defined DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT
+ if (!(modeFlags & AllowReplace))
+ dbusFlags |= DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT;
+#else
+#error Neither DBUS_NAME_FLAG_ALLOW_REPLACEMENT nor DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT are defined.
+#endif
if (modeFlags & ReplaceExisting)
dbusFlags |= DBUS_NAME_FLAG_REPLACE_EXISTING;

Report

deathmetal

13 years ago

First of all, thanks to the developers, great work!

But: I got the same problem during compilation...

Here is the workaround:

According to http://dbus.freedesktop.org/doc/dbus-specification.html
DBUS_NAME_FLAG_ALLOW_REPLACEMENT has a value 0x1, and DBUS_NAME_FLAG_REPLACE_EXISTING (also used in qdbusconnection.cpp) 0x2.

So, add the following lines to kdbus-0.8.5/src/dbus-qt3-backport/dbus/qdbusconnection.h:

#ifndef DBUS_NAME_FLAG_ALLOW_REPLACEMENT
#define DBUS_NAME_FLAG_ALLOW_REPLACEMENT 0x1
#endif

#ifndef DBUS_NAME_FLAG_REPLACE_EXISTING
#define DBUS_NAME_FLAG_REPLACE_EXISTING 0x2
#endif

I know, this is, to say the least, a real dirty solution, but it works fine :)

Report

deathmetal

13 years ago

First of all, thanks to the developers, great work!

But: I got the same problem during compilation...

Here is the workaround:

According to http://dbus.freedesktop.org/doc/dbus-specification.html
DBUS_NAME_FLAG_ALLOW_REPLACEMENT has a value 0x1, and DBUS_NAME_FLAG_REPLACE_EXISTING (also used in qdbusconnection.cpp) 0x2.

So, add the following lines to kdbus-0.8.5/src/dbus-qt3-backport/dbus/qdbusconnection.h:

#ifndef DBUS_NAME_FLAG_ALLOW_REPLACEMENT
#define DBUS_NAME_FLAG_ALLOW_REPLACEMENT 0x1
#endif

#ifndef DBUS_NAME_FLAG_REPLACE_EXISTING
#define DBUS_NAME_FLAG_REPLACE_EXISTING 0x2
#endif

I know, this is, to say the least, a real dirty solution, but it works fine :)

Report

13 years ago

Fix compilation for dbus-0.50.

12345678910
product-maker Count: 4 Rating: 5.0
File (click to download) Version Description PackagetypeArchitectureRelease Channel Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
0.8.6
updated Feb 19 2006
added Feb 01 2006
downloads today
0
page views today 3
System Tags app software