Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. [PATCH] vpn: Removed unnecessary goto (Slava Monich)
2. [PATCH] inet: Invoke rtnl callback on errors too (Slava Monich)
----------------------------------------------------------------------
Message: 1
Date: Thu, 16 Aug 2018 12:54:53 +0300
From: Slava Monich <[email protected]>
To: [email protected]
Subject: [PATCH] vpn: Removed unnecessary goto
Message-ID: <[email protected]>
---
plugins/vpn.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/plugins/vpn.c b/plugins/vpn.c
index c2a332b..b888e5e 100644
--- a/plugins/vpn.c
+++ b/plugins/vpn.c
@@ -484,19 +484,19 @@ static void connect_reply(DBusPendingCall *call, void
*user_data)
if (dbus_set_error_from_message(&error, reply)) {
int err = errorstr2val(error.name);
+
if (err != -EINPROGRESS) {
connman_error("Connect reply: %s (%s)", error.message,
error.name);
- dbus_error_free(&error);
-
DBG("data %p cb_data %p", data, cb_data);
+
if (cb_data) {
cb_data->callback(cb_data->message, err, NULL);
free_config_cb_data(cb_data);
data->cb_data = NULL;
}
- goto done;
}
+
dbus_error_free(&error);
}
@@ -506,7 +506,6 @@ static void connect_reply(DBusPendingCall *call, void
*user_data)
* state.
*/
-done:
dbus_message_unref(reply);
dbus_pending_call_unref(call);
--
1.9.1
------------------------------
Message: 2
Date: Thu, 16 Aug 2018 17:03:31 +0300
From: Slava Monich <[email protected]>
To: [email protected]
Subject: [PATCH] inet: Invoke rtnl callback on errors too
Message-ID: <[email protected]>
Not invoking the callback results in memory leaks like this one:
==6817== 30 (8 direct, 22 indirect) bytes in 1 blocks are definitely lost in
loss record 1,600 of 3,200
==6817== at 0x483F3EC: malloc (vg_replace_malloc.c)
==6817== by 0x8DC1B: __connman_inet_get_route (inet.c)
==6817== by 0x5E2E7: set_vpn_routes (connection.c)
==6817== by 0x5FD77: __connman_connection_gateway_add (connection.c)
==6817== by 0x837F7: __connman_ipconfig_gateway_add (ipconfig.c)
==6817== by 0x7DFA7: set_connected (provider.c)
==6817== by 0x7E0CB: connman_provider_set_state (provider.c)
==6817== by 0x499C3: set_provider_state (vpn.c)
==6817== by 0x4D95F: property_changed (vpn.c)
==6817== by 0xD7D4B: signal_filter (watch.c)
==6817== by 0xD8323: message_filter (watch.c)
==6817== by 0x4A1E02F: dbus_connection_dispatch (dbus-connection.c)
---
src/inet.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/inet.c b/src/inet.c
index dd13623..01c0c9c 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -2370,6 +2370,7 @@ static gboolean inet_rtnl_event(GIOChannel *chan,
GIOCondition cond,
return TRUE;
cleanup:
+ rtnl_data->callback(NULL, rtnl_data->user_data);
inet_rtnl_cleanup(rtnl_data);
return TRUE;
}
--
1.9.1
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 34, Issue 7
**************************************