Problems with dbus_connection_list_registered

sampo.nurmentaus at movial.fi sampo.nurmentaus at movial.fi
Thu Jul 8 01:20:33 PDT 2004



Hello folks,

I am trying to write a code that lists the
services registered to DBUS. Unfortunately
there seems to be a problem with this.

No matter what I do give as parent path
no childs are returned.

Even if I give only an empty path like:

void list_running_services(DBusConnection *con)
{
     char *path[1];
     char **childs;
     int n;

     path[0]=NULL;

     if (!dbus_connection_list_registered(con,(const char **)path,&childs))
     {
         g_print("** Memory allocation failed!\n");
         return;
     }


     for (n =0; childs[n];n++)
     {
         g_print("** Child %s\n",childs[n]);
     }
     /* n ends up buing zero */
     g_print("** Number of childs returned %d\n",n);
}



Any ideas anyone?


Thanks in advance,
Sampo




More information about the dbus mailing list