getting results from g_varient_new () ...
<p>I'm learning how to play with this g_varient_new() and it's really confusing me. I've read the <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#g-variant-new" rel="nofollow">https://developer.gnome.org/glib/unstable/glib-GVariant.html#g-variant-new</a> but I can't understand it easily.</p>

<p>I have a code:</p>

<pre><code>#define MM_DBUS_SERVICE "org.freedesktop.ModemManager1"
#define MM_DBUS_PATH "/org/freedesktop/ModemManager1/Modem/0"
#define MM_DBUS_GET_PROPERTIES  "org.freedesktop.DBus.Properties"
....

int i;
    GError *error = NULL;
    GVariant *ret;
    char **paths;
    ret = g_dbus_proxy_call_sync (proxy,
                          "org.freedesktop.DBus.Properties.Get",
                          g_variant_new ("(ss)",
                                      "org.freedesktop.ModemManager1.Modem",
                                      "SignalQuality"),
                          G_DBUS_CALL_FLAGS_NONE, -1,
                          NULL, &amp;error);

    if (!ret) {
            g_dbus_error_strip_remote_error (error);
            g_print ("failed: %s\n", error-&gt;message);
            g_error_free (error);
            return;
    }

    g_variant_get (ret, "(v)", &amp;paths);
    g_variant_unref (ret);

    for (i = 0; paths[i]; i++) {
            g_print ("Printing \n");
            g_print ("%s\n", paths[i]);
    }
    g_strfreev (paths);
</code></pre>

<p>It compiles fine but when it runs I get seg_fault. 
TESTING
Printing </p>

<p>Printing 
Segmentation fault</p>

<p>The result I am expecting from this call is:</p>

<pre><code>dbus-send --system --print-reply --dest=org.freedesktop.ModemManager1 "/org/freedesktop/ModemManager1/Modem/0" org.freedesktop.DBus.Properties.Get string:org.freedesktop.ModemManager1.Modem string:"SignalQuality"

method return sender=:1.1 -&gt; dest=:1.121 reply_serial=2
   variant       struct {
       uint32 38
       boolean true
   }
</code></pre>

<p>How do I get the variant data structure and the data in it out of the call? How am I supposed to form the g_variat_new() call to accomplish this?</p>

<p>Thanks</p>