~ubuntu-branches/ubuntu/precise/network-manager/precise

« back to all changes in this revision

Viewing changes to libnm-glib/nm-types.c

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2012-02-09 16:45:41 UTC
  • mfrom: (1.1.53)
  • Revision ID: package-import@ubuntu.com-20120209164541-4h90zknlsfdb7x35
Tags: 0.9.2.0+git201202091925.c721477-0ubuntu1
* upstream snapshot 2012-02-09 19:25:59 (GMT)
  + c721477d11d4fe144111d6d2eec8f93f2e9186c9
* debian/patches/avoid-periodic-disk-wakeups.patch: refreshed.
* debian/patches/nl3-default-ip6-route.patch: refreshed.
* debian/libnm-glib4.symbols: add symbols:
  + nm_active_connection_get_master@Base
  + nm_client_new_async@Base
  + nm_client_new_finish@Base
  + nm_remote_settings_new_async@Base
  + nm_remote_settings_new_finish@Base
  + nm_device_get_state_reason@Base
* debian/libnm-util2.symbols: add symbols:
  + nm_setting_802_1x_get_pac_file@Base
  + nm_setting_infiniband_get_transport_mode@Base

Show diffs side-by-side

added added

removed removed

Lines of Context:
172
172
gboolean
173
173
_nm_string_array_demarshal (GValue *value, GPtrArray **dest)
174
174
{
175
 
        GPtrArray *array;
 
175
        char **array;
176
176
 
177
 
        if (!G_VALUE_HOLDS (value, DBUS_TYPE_G_ARRAY_OF_STRING))
 
177
        if (!G_VALUE_HOLDS (value, G_TYPE_STRV))
178
178
                return FALSE;
179
179
 
180
180
        if (*dest) {
182
182
                *dest = NULL;
183
183
        }
184
184
 
185
 
        array = (GPtrArray *) g_value_get_boxed (value);
186
 
        if (array && array->len) {
 
185
        array = (char **) g_value_get_boxed (value);
 
186
        if (array && array[0]) {
187
187
                int i;
188
188
 
189
 
                *dest = g_ptr_array_sized_new (array->len);
190
 
                for (i = 0; i < array->len; i++)
191
 
                        g_ptr_array_add (*dest, g_strdup (g_ptr_array_index (array, i)));
 
189
                *dest = g_ptr_array_new ();
 
190
                for (i = 0; array[i]; i++)
 
191
                        g_ptr_array_add (*dest, g_strdup (array[i]));
192
192
        }
193
193
 
194
194
        return TRUE;
323
323
        dest = g_ptr_array_sized_new (src->len);
324
324
        for (i = 0; i < src->len; i++) {
325
325
                struct in6_addr *addr = g_ptr_array_index (src, i);
326
 
                struct in6_addr *dup;
 
326
                struct in6_addr *copy;
327
327
 
328
 
                dup = g_malloc0 (sizeof (struct in6_addr));
329
 
                memcpy (dup, addr, sizeof (struct in6_addr));
330
 
                g_ptr_array_add (dest, dup);
 
328
                copy = g_malloc0 (sizeof (struct in6_addr));
 
329
                memcpy (copy, addr, sizeof (struct in6_addr));
 
330
                g_ptr_array_add (dest, copy);
331
331
        }
332
332
        return dest;
333
333
}