Bug 246364

Summary: Description on the KCM misbehaviour
Product: [Unmaintained] solid Reporter: Aleix Pol <aleixpol>
Component: bluetooth-kcmAssignee: Rafael Fernández López <ereslibre>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: test
Add debug output

Description Aleix Pol 2010-07-31 18:25:11 UTC
Created attachment 49714 [details]
test

Version:           unspecified (using Devel) 
OS:                Linux

Alex gave me some tests to help to fix the problems I've had and asked me to report here, so here it is.

Reproducible: Always

Steps to Reproduce:
Run the attached test

Actual Results:  
kde-devel@tatilx:~/blue/build-libbluedevil/bluedevil$ ./test/cosa 
QDBusArgument: read from a write-only object
QDBusArgument: read from a write-only object
QDBusArgument: read from a write-only object
Checking systemBus is connect:  
Checking if d->m_defaultAdapter is null 
Yes, it is 
Adapter is nuuuul
Comment 1 Alex Fiestas 2010-07-31 18:27:01 UTC
This seems to be a problem in the library, so ereslibre is the man to fix this one.
Comment 2 Rafael Fernández López 2010-08-02 11:21:35 UTC

*** This bug has been marked as a duplicate of bug 246039 ***
Comment 3 Rafael Fernández López 2010-08-02 11:39:24 UTC
Created attachment 49747 [details]
Add debug output

Can you please apply the attached patch and post the output when running the simple test case you provided ?
Comment 4 Aleix Pol 2010-08-02 14:49:00 UTC
There you go:

kde-devel@tatilx:~/blue/build-libbluedevil/bluedevil/test$ ./cosa 
manager ctor 
got bus 
getting all adapters 
QDBusArgument: read from a write-only object
QDBusArgument: read from a write-only object
QDBusArgument: read from a write-only object
asking for default adapter 
setting default adapter 
Adapter is nuuuul
Comment 5 Rafael Fernández López 2010-08-02 16:42:58 UTC
Weird. Can you please run this commands and post the output ?

dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter

and

dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters
Comment 6 Aleix Pol 2010-08-02 17:07:29 UTC
kde-devel@tatilx:~/playground/kalgebra-newplotter/build$ dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter
Error org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.413" (uid=1001 pid=1442 comm="dbus-send) interface="org.bluez.Manager" member="DefaultAdapter" error name="(unset)" requested_reply=0 destination="org.bluez" (uid=0 pid=3768 comm="/usr/sbin/bluetoothd))
kde-devel@tatilx:~/playground/kalgebra-newplotter/build$ 
kde-devel@tatilx:~/playground/kalgebra-newplotter/build$ dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters
Error org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.414" (uid=1001 pid=1443 comm="dbus-send) interface="org.bluez.Manager" member="ListAdapters" error name="(unset)" requested_reply=0 destination="org.bluez" (uid=0 pid=3768 comm="/usr/sbin/bluetoothd))

Maybe there's some lacking privileges?