Hi Marcel,

>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]] On Behalf Of Marcel Holtmann
>Sent: Friday, July 29, 2011 10:08 PM
>To: [email protected]
>Subject: Re: [PATCH] ofono: Duplicate path value instead use it directly
>
>Hi,
>
>> Path value will be freed after the function call, this may lead to
>> can't connect/reconnect to a 3G service
>> ---
>>  plugins/ofono.c |   17 ++++++++++-------
>>  1 files changed, 10 insertions(+), 7 deletions(-)
>
>you need to fix your .gitconfig to have proper author information. We do
>not accept patches with just an email address.
I have changed my config name from arron to "Yu A Wang", thanks
 
>> diff --git a/plugins/ofono.c b/plugins/ofono.c
>> index 8650bfc..2bf777d 100644
>> --- a/plugins/ofono.c
>> +++ b/plugins/ofono.c
>> @@ -882,7 +882,7 @@ static int add_network(struct connman_device
>*device,
>>
>>      create_service(network);
>>
>> -    g_hash_table_insert(network_hash, (char *) path, info);
>> +    g_hash_table_insert(network_hash, g_strdup(path), info);
>>
>>      connman_network_set_available(network, TRUE);
>>      connman_network_set_index(network, -1);
>> @@ -1585,7 +1585,7 @@ static void ofono_connect(DBusConnection
>*connection, void *user_data)
>>                                              g_free, remove_modem);
>>
>>      network_hash = g_hash_table_new_full(g_str_hash, g_str_equal,
>> -                                            NULL, remove_network);
>> +                                            g_free, remove_network);
>>
>>      call_ofono("/", OFONO_MANAGER_INTERFACE, GET_MODEMS,
>>                      manager_modems_reply, NULL, NULL,
>> @@ -1596,12 +1596,15 @@ static void ofono_disconnect(DBusConnection
>*connection, void *user_data)
>>  {
>>      DBG("connection %p", connection);
>>
>> -    if (modem_hash == NULL)
>> -            return;
>> -
>> -    g_hash_table_destroy(modem_hash);
>> +    if (modem_hash != NULL) {
>> +            g_hash_table_destroy(modem_hash);
>> +            modem_hash = NULL;
>> +    }
>>
>> -    modem_hash = NULL;
>> +    if (network_hash != NULL) {
>> +            g_hash_table_destroy(network_hash);
>> +            network_hash = NULL;
>> +    }
>>  }
>
>And this change does not fit your commit description. Do that in a
>separate patch please.
I will separate it to a new patch.

Thanks
Arron

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to