Loosing dbus messages (glib receive)

Michael K vk2bea at yahoo.com
Sat Mar 18 11:13:40 PST 2006


I am having a little problem with a program sending
messages over the dbus.
Perhaps somemone will recognize what's a miss here!

I have a program that cause certain hotplug events
send a message to my program over the DBUS (system).

I receive almost all of the messages, but I am
occasionally loosing a message. If I use
# dbus-monitor --systembus
to look at the bus I can see all the messages, but my
program is not getting them all.

Is there something I'm not doing ????
I'm using dbus-0.50-1 on a fedora core 4 system.

Any help appreciated.....
    Michael

My receiving program sets up the receiving process:

-----------------------------------
#define GUTENBERG_DBUS_NAME              
"gov.LoC.NLS"
#define GUTENBERG_DBUS_OBJECT_NAME       
"/gov/LoC/NLS/Gutenburg"
#define GUTENBERG_DBUS_OBJECT_INTERFACE  
"gov.LoC.NLS.Gutenburg.Signal"
#define GUTENBERG_DBUS_SIGNAL_NAME       
"USB_MSD_Connection"

  if ( !(bus = dbus_g_bus_get (DBUS_BUS_SYSTEM,
&error)) ) {
  	g_printerr("Error: %s\n", error->message );
  	g_error_free (error);
  }


  if( !(remote_object = dbus_g_proxy_new_for_name
(bus,
					     GUTENBERG_DBUS_NAME,
					     GUTENBERG_DBUS_OBJECT_NAME,
					     GUTENBERG_DBUS_OBJECT_INTERFACE )) ){
  	g_printerr("Error: %s\n", error->message );
  	g_error_free (error);
  }

  dbus_g_proxy_add_signal (remote_object,
GUTENBERG_DBUS_SIGNAL_NAME, G_TYPE_STRING,
G_TYPE_INVALID);
  dbus_g_proxy_connect_signal (remote_object,
GUTENBERG_DBUS_SIGNAL_NAME, G_CALLBACK
(USB_MSD_connection_signal_handler),
			       NULL, NULL);
------------------------------------

void
USB_MSD_connection_signal_handler (DBusGProxy *proxy,
const char *info_string, gpointer user_data)
{
  // see the message to compare with dbus-monitor
  fprintf( stderr, "%s\n", info_string );
}

-------------------------------------


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the dbus mailing list