summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-06-26 09:25:06 -0400
committerDan Winship <danw@gnome.org>2014-09-04 09:20:11 -0400
commit3fbabde4c3b9446226c627c6d10ce83aff95b356 (patch)
tree48ff4ddd6adf9d3e710c4b7f36121d3f53eefa12 /examples
parent983756578935580a663735cc2c650a6ebfbc8015 (diff)
downloadNetworkManager-3fbabde4c3b9446226c627c6d10ce83aff95b356.tar.gz
libnm-core: replace GByteArray with pointer + length in some APIs
APIs that take arbitrary data should take it in the form of a pointer and length, not a GByteArray, so that you can use them regardless of what format you have the data in (GByteArray, GBytes, plain array, etc).
Diffstat (limited to 'examples')
-rw-r--r--examples/C/glib/get-ap-info-libnm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/C/glib/get-ap-info-libnm.c b/examples/C/glib/get-ap-info-libnm.c
index aba22c6dd9..acd93f9ba7 100644
--- a/examples/C/glib/get-ap-info-libnm.c
+++ b/examples/C/glib/get-ap-info-libnm.c
@@ -97,7 +97,7 @@ show_access_point_info (NMAccessPoint *ap)
strength = nm_access_point_get_strength (ap);
/* Convert to strings */
- ssid_str = nm_utils_ssid_to_utf8 (ssid);
+ ssid_str = nm_utils_ssid_to_utf8 (ssid->data, ssid->len);
freq_str = g_strdup_printf ("%u MHz", freq);
bitrate_str = g_strdup_printf ("%u Mbit/s", bitrate/1000);
strength_str = g_strdup_printf ("%u", strength);
@@ -163,7 +163,7 @@ show_wifi_device_info (NMDevice *device)
if (nm_device_get_state (device) == NM_DEVICE_STATE_ACTIVATED) {
if ((active_ap = nm_device_wifi_get_active_access_point (NM_DEVICE_WIFI (device)))) {
active_ssid = nm_access_point_get_ssid (active_ap);
- active_ssid_str = nm_utils_ssid_to_utf8 (active_ssid);
+ active_ssid_str = nm_utils_ssid_to_utf8 (active_ssid->data, active_ssid->len);
}
}