libnm-glib: handle errors on AddConnection reply

This commit is contained in:
Dan Williams 2010-12-28 16:40:07 -06:00
parent ad9270da79
commit dd6d72d6a1

View file

@ -394,10 +394,13 @@ add_connection_done (DBusGProxy *proxy,
{
AddConnectionInfo *info = user_data;
info->connection = new_connection_cb (proxy, path, info->self);
g_assert (info->connection);
/* Wait until this connection is fully initialized before calling the callback */
if (error) {
add_connection_info_complete (info->self, info, error);
} else {
info->connection = new_connection_cb (proxy, path, info->self);
g_assert (info->connection);
/* Wait until this connection is fully initialized before calling the callback */
}
g_free (path);
}