[Dbus-cxx-users] locks at on creating controller adapter
Status: Beta
Brought to you by:
rvinyard
From: <Vas...@so...> - 2009-09-02 12:58:17
|
Hi, I am trying to use dbus-cxx 0.4.2 with a project and I have run into some trouble. I'm using the code from the calculator example, modified for what I am doing: DBus::init(); int ret; DBus::Dispatcher dispatcher; DBus::Connection::pointer conn = dispatcher.create_connection(DBus::BUS_SESSION); std::cout << "Requesting name" << endl; // request a name on the bus ret = conn->request_name( "pa.agent.controller", DBUS_NAME_FLAG_REPLACE_EXISTING ); if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) { cout << "Shit happened" << endl; } std::cout << "Declaring adapter" << endl; Controller controller; std::cout << "Creating adapter" << controller.startnode()<< endl; DBus::ControllerAdapter::pointer adapter = DBus::ControllerAdapter::create(&controller); The program gets stuck at DBus::ControllerAdapter::pointer adapter = DBus::ControllerAdapter::create(&controller); With this output: Requesting name Declaring adapter Creating adapter0 terminate called after throwing an instance of 'DBus::Error' what(): Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. Thanks, Vasile |