error of segmentation

Edison_lin-林俊翰 edison_lin at gemtek.com.tw
Tue May 26 05:37:05 PDT 2009


Hi Anas,
For an array, "&array == array", so you can just use

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";

instead, 

OR
char *tmPtr = introspect_xml;
...
if (!dbus_message_append_args (reply,
                                 DBUS_TYPE_STRING, &tmPtr ,
                                 DBUS_TYPE_INVALID))
        {
              fprintf(stderr, "Out Of Memory!\n");
              exit(1);
        }

Please take a try ~
BR,
Edison Lin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20090526/d52f16fd/attachment.htm 


More information about the dbus mailing list