dbus signal and sending parameters

Arvind Ayyangar arvind.ayyangar at gmail.com
Mon Dec 25 21:56:18 PST 2006


I am using the sytem bus for the two application and dbus-monitor
doesn't seem to show the traffic over the system bus

here is the code
app1 :
 dbus_message_iter_init_append(msg, &args);
     if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &icon)) {
                   printf("Out Of Memory!\n");
           }

   if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_INT32, &timeout))  {
                   printf("Out Of Memory!\n");
  }
           if (!dbus_connection_send(conn, msg, &serial)) {
                    printf("Out Of Memory!\n");
           }
           dbus_connection_flush(conn);


app2:
if (!dbus_message_iter_init(msg, &args)){
                                 printf ("No parameters \n");
                         }
    else {
           dbus_message_iter_get_basic(&args, &sigValue);
           dbus_message_iter_get_basic(&args, &timeout);
    }


Can we pass a structure instead?

> What you described seems correct: two dbus_message_iter_append_basic.
> Since that is not working, it would seem the error is somewhere else. Can
> you confirm with dbus-monitor that only a single parameter is sent?
>
> If you can, we'd need to see the rest of the marshalling code to find out
> what's wrong. If you can't, then the bug is on the receiving
> applications.
>
> --
>  Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>   PGP/GPG: 0x6EF45358; fingerprint:
>   E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
>
>
>


-- 
Regards
ARviND AyyangaR


More information about the dbus mailing list