mirror of git://git.sysmocom.de/ofono
Get rid of dbus_gsm_free_string_array
Use g_strfreev instead.
This commit is contained in:
parent
c31350294f
commit
1426d84ad7
|
@ -35,19 +35,6 @@
|
|||
|
||||
static DBusConnection *g_connection;
|
||||
|
||||
void dbus_gsm_free_string_array(char **array)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!array)
|
||||
return;
|
||||
|
||||
for (i = 0; array[i]; i++)
|
||||
g_free(array[i]);
|
||||
|
||||
g_free(array);
|
||||
}
|
||||
|
||||
void dbus_gsm_append_variant(DBusMessageIter *iter,
|
||||
int type, void *value)
|
||||
{
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
#define MAX_DBUS_PATH_LEN 64
|
||||
|
||||
void dbus_gsm_free_string_array(char **array);
|
||||
|
||||
/* Essentially a{sv} */
|
||||
#define PROPERTIES_ARRAY_SIGNATURE DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING \
|
||||
DBUS_TYPE_STRING_AS_STRING \
|
||||
|
|
|
@ -178,7 +178,7 @@ out:
|
|||
registration_status_callback, modem);
|
||||
}
|
||||
|
||||
/* Must use dbus_gsm_free_string_array on network_operators */
|
||||
/* Must use g_strfreev on network_operators */
|
||||
static void network_operator_populate_registered(struct ofono_modem *modem,
|
||||
char ***network_operators)
|
||||
{
|
||||
|
@ -289,7 +289,7 @@ static void network_operator_emit_available_operators(struct ofono_modem *modem)
|
|||
DBUS_TYPE_OBJECT_PATH,
|
||||
&network_operators);
|
||||
|
||||
dbus_gsm_free_string_array(network_operators);
|
||||
g_strfreev(network_operators);
|
||||
}
|
||||
|
||||
static void set_network_operator_status(struct ofono_modem *modem,
|
||||
|
@ -736,7 +736,7 @@ static DBusMessage *network_get_properties(DBusConnection *conn,
|
|||
DBUS_TYPE_OBJECT_PATH,
|
||||
&network_operators);
|
||||
|
||||
dbus_gsm_free_string_array(network_operators);
|
||||
g_strfreev(network_operators);
|
||||
|
||||
if (netreg->signal_strength != -1) {
|
||||
dbus_uint16_t strength = netreg->signal_strength;
|
||||
|
|
|
@ -156,7 +156,7 @@ static DBusMessage *sim_get_properties(DBusConnection *conn,
|
|||
|
||||
dbus_gsm_dict_append_array(&dict, "SubscriberNumbers",
|
||||
DBUS_TYPE_STRING, &own_numbers);
|
||||
dbus_gsm_free_string_array(own_numbers);
|
||||
g_strfreev(own_numbers);
|
||||
|
||||
dbus_message_iter_close_container(&iter, &dict);
|
||||
|
||||
|
@ -232,7 +232,7 @@ check:
|
|||
"SubscriberNumbers",
|
||||
DBUS_TYPE_STRING,
|
||||
&own_numbers);
|
||||
dbus_gsm_free_string_array(own_numbers);
|
||||
g_strfreev(own_numbers);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -715,14 +715,14 @@ static DBusMessage *manager_get_properties(DBusConnection *conn,
|
|||
dbus_gsm_dict_append_array(&dict, "Calls", DBUS_TYPE_OBJECT_PATH,
|
||||
&callobj_list);
|
||||
|
||||
dbus_gsm_free_string_array(callobj_list);
|
||||
g_strfreev(callobj_list);
|
||||
|
||||
voicecalls_path_list(modem, calls->multiparty_list, &callobj_list);
|
||||
|
||||
dbus_gsm_dict_append_array(&dict, "MultipartyCalls",
|
||||
DBUS_TYPE_OBJECT_PATH, &callobj_list);
|
||||
|
||||
dbus_gsm_free_string_array(callobj_list);
|
||||
g_strfreev(callobj_list);
|
||||
|
||||
dbus_message_iter_close_container(&iter, &dict);
|
||||
|
||||
|
@ -1143,7 +1143,7 @@ static gboolean real_emit_call_list_changed(void *data)
|
|||
DBUS_TYPE_OBJECT_PATH,
|
||||
&objpath_list);
|
||||
|
||||
dbus_gsm_free_string_array(objpath_list);
|
||||
g_strfreev(objpath_list);
|
||||
|
||||
ofono_debug("Resetting updating flag");
|
||||
voicecalls->flags &= ~VOICECALLS_FLAG_UPDATING_CALL_LIST;
|
||||
|
@ -1179,7 +1179,7 @@ static gboolean real_emit_multiparty_call_list_changed(void *data)
|
|||
DBUS_TYPE_OBJECT_PATH,
|
||||
&objpath_list);
|
||||
|
||||
dbus_gsm_free_string_array(objpath_list);
|
||||
g_strfreev(objpath_list);
|
||||
|
||||
voicecalls->flags &= ~VOICECALLS_FLAG_UPDATING_MPTY_CALL_LIST;
|
||||
|
||||
|
|
Loading…
Reference in New Issue