Commit 79a94106 authored by Thomas Haller's avatar Thomas Haller

c-e: tag PageNewConnectionResultFunc with a special argument

parent 497f7dc7
......@@ -36,7 +36,11 @@
/* for ARPHRD_ETHER / ARPHRD_INFINIBAND for MAC utilies */
#include <net/if_arp.h>
typedef void (*PageNewConnectionResultFunc) (NMConnection *connection,
struct _func_tag_page_new_connection_result;
#define FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_IMPL struct _func_tag_page_new_connection_result *_dummy
#define FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL ((struct _func_tag_page_new_connection_result *) NULL)
typedef void (*PageNewConnectionResultFunc) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_IMPL,
NMConnection *connection,
gboolean canceled,
GError *error,
gpointer user_data);
......
......@@ -535,7 +535,8 @@ typedef struct {
} NewConnectionData;
static void
new_connection_result (NMConnection *connection,
new_connection_result (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_IMPL,
NMConnection *connection,
gboolean canceled,
GError *error,
gpointer user_data)
......
......@@ -274,7 +274,7 @@ new_connection_mobile_wizard_done (NMAMobileWizard *wizard,
}
out:
(*info->result_func) (info->connection, canceled, NULL, info->user_data);
(*info->result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, info->connection, canceled, NULL, info->user_data);
if (wizard)
nma_mobile_wizard_destroy (wizard);
......
......@@ -645,6 +645,6 @@ bond_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
NULL);
g_free (my_iface);
(*result_func) (connection, FALSE, NULL, user_data);
(*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
}
......@@ -339,5 +339,5 @@ bridge_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
NULL);
g_free (my_iface);
(*result_func) (connection, FALSE, NULL, user_data);
(*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
}
......@@ -228,5 +228,5 @@ dsl_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
NULL);
nm_connection_add_setting (connection, setting);
(*result_func) (connection, FALSE, NULL, user_data);
(*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
}
......@@ -522,5 +522,5 @@ ethernet_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
client);
nm_connection_add_setting (connection, nm_setting_wired_new ());
(*result_func) (connection, FALSE, NULL, user_data);
(*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
}
......@@ -254,5 +254,5 @@ infiniband_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
client);
nm_connection_add_setting (connection, nm_setting_infiniband_new ());
(*result_func) (connection, FALSE, NULL, user_data);
(*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
}
......@@ -490,7 +490,7 @@ new_connection_mobile_wizard_done (NMAMobileWizard *wizard,
nm_connection_add_setting (info->connection, nm_setting_ppp_new ());
}
(*info->result_func) (info->connection, canceled, NULL, info->user_data);
(*info->result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, info->connection, canceled, NULL, info->user_data);
if (wizard)
nma_mobile_wizard_destroy (wizard);
......
......@@ -1276,5 +1276,5 @@ team_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
NULL);
g_free (my_iface);
(*result_func) (connection, FALSE, NULL, user_data);
(*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
}
......@@ -801,5 +801,5 @@ vlan_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
client);
nm_connection_add_setting (connection, nm_setting_vlan_new ());
(*result_func) (connection, FALSE, NULL, user_data);
(*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
}
......@@ -224,7 +224,7 @@ vpn_type_result_func (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL,
{
NewVpnInfo *info = user_data;
info->result_func (connection, connection == NULL, NULL, info->user_data);
info->result_func (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, connection == NULL, NULL, info->user_data);
g_slice_free (NewVpnInfo, info);
}
......@@ -321,5 +321,5 @@ vpn_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
complete_vpn_connection (connection, client);
(*result_func) (connection, FALSE, NULL, user_data);
(*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
}
......@@ -620,5 +620,5 @@ wifi_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL,
g_object_set (s_wifi, NM_SETTING_WIRELESS_MODE, "infrastructure", NULL);
nm_connection_add_setting (connection, s_wifi);
(*result_func) (connection, FALSE, NULL, user_data);
(*result_func) (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL, connection, FALSE, NULL, user_data);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment