diff options
author | Dan Williams <dcbw@redhat.com> | 2008-08-18 21:24:31 +0000 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2008-08-18 21:24:31 +0000 |
commit | 0b4d5573196c3ff8985716170e6f4757a5453b6f (patch) | |
tree | 6952acec45afcb2ea8d82ea225efae89f0d46c9f /libnm-util | |
parent | 19af0bbd97d5fbb98f018d5a48aa65849f3ef235 (diff) | |
download | NetworkManager-0b4d5573196c3ff8985716170e6f4757a5453b6f.tar.gz |
2008-08-18 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-utils.c
libnm-util/nm-utils.h
- (nm_utils_garray_to_string): remove; NM was the only user and doesn't
export anything that needs to be converted with this function
* src/dhcp-manager/nm-dhcp-manager.c
- (garray_to_string): convert a byte array to a UTF-8 string with
minimal validation; the DHCP client sends it in ASCII anyway
- (get_option, copy_option): use garray_to_string()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3985 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Diffstat (limited to 'libnm-util')
-rw-r--r-- | libnm-util/nm-utils.c | 27 | ||||
-rw-r--r-- | libnm-util/nm-utils.h | 3 |
2 files changed, 0 insertions, 30 deletions
diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c index ed656054b4..010ba80a96 100644 --- a/libnm-util/nm-utils.c +++ b/libnm-util/nm-utils.c @@ -363,33 +363,6 @@ nm_utils_gvalue_hash_dup (GHashTable *hash) return table; } -/* Converts a GArray into a UTF-8 string */ -char * -nm_utils_garray_to_string (GArray *array) -{ - GString *str; - int i; - char c; - char *converted = NULL; - - g_return_val_if_fail (array != NULL, NULL); - - str = g_string_sized_new (array->len); - for (i = 0; i < array->len; i++) { - c = array->data[i]; - - /* Convert NULLs to spaces to increase the readability. */ - if (c == '\0') - c = ' '; - str = g_string_append_c (str, c); - } - str = g_string_append_c (str, '\0'); - - converted = string_to_utf8 (str->str, (gsize) str->len); - g_string_free (str, FALSE); - return converted; -} - void nm_utils_slist_free (GSList *list, GDestroyNotify elem_destroy_fn) { diff --git a/libnm-util/nm-utils.h b/libnm-util/nm-utils.h index 394988fab6..464c0c5b6e 100644 --- a/libnm-util/nm-utils.h +++ b/libnm-util/nm-utils.h @@ -147,9 +147,6 @@ char *nm_utils_ssid_to_utf8 (const char *ssid, guint32 len); GHashTable *nm_utils_gvalue_hash_dup (GHashTable *hash); -/* Converts a GArray into a UTF-8 string */ -char *nm_utils_garray_to_string (GArray *array); - void nm_utils_slist_free (GSList *list, GDestroyNotify elem_destroy_fn); |