error of segmentation

Anas Alzouhbi anas.lbn at gmail.com
Tue May 26 03:04:04 PDT 2009


Hi, I developped a code, which use dbus, I inserted in my code an
introspection, but while running it I obtain an error of segmentation
this is a part of code where is the problem:
             static const char introspect_xml[] =
          "<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object
Introspection 1.0//EN\"\n"
          "                      \"
http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n"
          "<node>\n"
          "  <interface name=\"ch.cett.misse.ffmpeg\">\n"
          "    <method name=\"image_rate_get\">\n"
          "      <arg name=\"port\" direction=\"out\" type=\"u\"/>\n"
          "    </method>\n"
          "  </interface>\n"
          "</node>\n";
        reply = dbus_message_new_method_return(msg);
               if (!dbus_message_append_args (reply,
                                 DBUS_TYPE_STRING, &introspect_xml,
                                 DBUS_TYPE_INVALID))
        {
              fprintf(stderr, "Out Of Memory!\n");
              exit(1);
        }

        if (!dbus_connection_send(conn, reply, &serial))
        {
              fprintf(stderr, "Out Of Memory!\n");
              exit(1);
           }

I think the problem is with DBUS_TYPE_STRING, which type I have to use
thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20090526/5c4f050b/attachment.htm 


More information about the dbus mailing list