Dan Williams schrieb: > Right, though we should probably get the plugins using libnm-util like > the applet and NM do, then they wouldn't have to include the sources at > all. ACK, would be the cleanest way, as it's shared between NM itself and the vpn plugins. > One quick note; your diff is in context diff format, which is hard to > follow for many people. Using 'cvs diff -u' is the best option, to > produce a 'unified' diff format which is much easier to read. Sure. Done. Didn't notice. Again, I've only diffed the vpn-daemons directory to avoid too much noise. Regards, Thomas
? vpn_daemon-vpnc_dict_api.patch ? vpnc/backup-101920061846-pre-vpnc.tgz ? vpnc/backup-102820061906-pre-networkmanager-vpnc.tgz ? vpnc/description-pak ? vpnc/doc-pak ? vpnc/networkmanager-vpnc_0.7.0-1_i386.deb ? vpnc/auth-dialog/.deps ? vpnc/po/ca.gmo ? vpnc/po/en_GB.gmo ? vpnc/po/es.gmo ? vpnc/po/fi.gmo ? vpnc/po/hu.gmo ? vpnc/po/it.gmo ? vpnc/po/ja.gmo ? vpnc/po/vi.gmo ? vpnc/po/zh_CN.gmo ? vpnc/properties/.deps ? vpnc/src/.deps Index: vpnc/src/nm-utils.c =================================================================== RCS file: /cvs/gnome/NetworkManager/vpn-daemons/vpnc/src/nm-utils.c,v retrieving revision 1.1 diff -u -r1.1 nm-utils.c --- vpnc/src/nm-utils.c 12 Jun 2005 14:34:54 -0000 1.1 +++ vpnc/src/nm-utils.c 1 Nov 2006 22:35:22 -0000 @@ -24,6 +24,7 @@ #include <errno.h> #include <glib.h> +#include <dbus/dbus.h> #include "nm-utils.h" gchar *nm_dbus_escape_object_path (const gchar *utf8_string) @@ -130,3 +131,476 @@ return utf8_string; } + + +/** + * Start a dict in a dbus message. Should be paired with a call to + * { link nmu_dbus_dict_close_write}. + * + * @param iter A valid dbus message iterator + * @param iter_dict (out) A dict iterator to pass to further dict functions + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_open_write (DBusMessageIter *iter, DBusMessageIter *iter_dict) +{ + if (!iter || !iter_dict) + return FALSE; + + return dbus_message_iter_open_container (iter, + DBUS_TYPE_ARRAY, + DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING + DBUS_TYPE_STRING_AS_STRING + DBUS_TYPE_VARIANT_AS_STRING + DBUS_DICT_ENTRY_END_CHAR_AS_STRING, + iter_dict); +} + +/** + * End a dict element in a dbus message. Should be paired with + * a call to { link nmu_dbus_dict_open_write}. + * + * @param iter valid dbus message iterator, same as passed to + * nmu_dbus_dict_open_write() + * @param iter_dict a dbus dict iterator returned from { link nmu_dbus_dict_open_write} + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_close_write (DBusMessageIter *iter, DBusMessageIter *iter_dict) +{ + if (!iter || !iter_dict) + return FALSE; + + return dbus_message_iter_close_container (iter, iter_dict); +} + + +static const char * +_nmu_get_type_as_string_from_type (const int type) +{ + switch (type) + { + case DBUS_TYPE_BYTE: + return DBUS_TYPE_BYTE_AS_STRING; + case DBUS_TYPE_BOOLEAN: + return DBUS_TYPE_BOOLEAN_AS_STRING; + case DBUS_TYPE_INT16: + return DBUS_TYPE_INT16_AS_STRING; + case DBUS_TYPE_UINT16: + return DBUS_TYPE_UINT16_AS_STRING; + case DBUS_TYPE_INT32: + return DBUS_TYPE_INT32_AS_STRING; + case DBUS_TYPE_UINT32: + return DBUS_TYPE_UINT32_AS_STRING; + case DBUS_TYPE_INT64: + return DBUS_TYPE_INT64_AS_STRING; + case DBUS_TYPE_UINT64: + return DBUS_TYPE_UINT64_AS_STRING; + case DBUS_TYPE_DOUBLE: + return DBUS_TYPE_DOUBLE_AS_STRING; + case DBUS_TYPE_STRING: + return DBUS_TYPE_STRING_AS_STRING; + case DBUS_TYPE_OBJECT_PATH: + return DBUS_TYPE_OBJECT_PATH_AS_STRING; + case DBUS_TYPE_ARRAY: + return DBUS_TYPE_ARRAY_AS_STRING; + default: + return NULL; + } + return NULL; +} + + +static dbus_bool_t +_nmu_dbus_add_dict_entry_start (DBusMessageIter *iter_dict, + DBusMessageIter *iter_dict_entry, + const char *key, + const int value_type) +{ + if (!dbus_message_iter_open_container (iter_dict, + DBUS_TYPE_DICT_ENTRY, + NULL, + iter_dict_entry)) + return FALSE; + + if (!dbus_message_iter_append_basic (iter_dict_entry, DBUS_TYPE_STRING, &key)) + return FALSE; + + return TRUE; +} + + +static dbus_bool_t +_nmu_dbus_add_dict_entry_end (DBusMessageIter *iter_dict, + DBusMessageIter *iter_dict_entry, + DBusMessageIter *iter_dict_val) +{ + if (!dbus_message_iter_close_container (iter_dict_entry, iter_dict_val)) + return FALSE; + if (!dbus_message_iter_close_container (iter_dict, iter_dict_entry)) + return FALSE; + + return TRUE; +} + + +static dbus_bool_t +_nmu_dbus_add_dict_entry_basic (DBusMessageIter *iter_dict, + const char *key, + const int value_type, + const void *value) +{ + DBusMessageIter iter_dict_entry, iter_dict_val; + const char * type_as_string = NULL; + + type_as_string = _nmu_get_type_as_string_from_type (value_type); + if (!type_as_string) + return FALSE; + + if (!_nmu_dbus_add_dict_entry_start (iter_dict, &iter_dict_entry, + key, value_type)) + return FALSE; + + if (!dbus_message_iter_open_container (&iter_dict_entry, + DBUS_TYPE_VARIANT, + type_as_string, + &iter_dict_val)) + return FALSE; + + if (!dbus_message_iter_append_basic (&iter_dict_val, value_type, value)) + return FALSE; + + if (!_nmu_dbus_add_dict_entry_end (iter_dict, &iter_dict_entry, + &iter_dict_val)) + return FALSE; + + return TRUE; +} + + +static dbus_bool_t +_nmu_dbus_add_dict_entry_byte_array (DBusMessageIter *iter_dict, + const char *key, + const char *value, + const dbus_uint32_t value_len) +{ + DBusMessageIter iter_dict_entry, iter_dict_val, iter_array; + dbus_uint32_t i; + + if (!_nmu_dbus_add_dict_entry_start (iter_dict, &iter_dict_entry, + key, DBUS_TYPE_ARRAY)) + return FALSE; + + if (!dbus_message_iter_open_container (&iter_dict_entry, + DBUS_TYPE_VARIANT, + DBUS_TYPE_ARRAY_AS_STRING + DBUS_TYPE_BYTE_AS_STRING, + &iter_dict_val)) + return FALSE; + + if (!dbus_message_iter_open_container (&iter_dict_val, DBUS_TYPE_ARRAY, + DBUS_TYPE_BYTE_AS_STRING, &iter_array)) + return FALSE; + + for (i = 0; i < value_len; i++) + { + if (!dbus_message_iter_append_basic (&iter_array, DBUS_TYPE_BYTE, + &(value[i]))) + return FALSE; + } + + if (!dbus_message_iter_close_container (&iter_dict_val, &iter_array)) + return FALSE; + + if (!_nmu_dbus_add_dict_entry_end (iter_dict, &iter_dict_entry, + &iter_dict_val)) + return FALSE; + + return TRUE; +} + + +static dbus_bool_t +_nmu_dbus_add_dict_entry_string_array (DBusMessageIter *iter_dict, + const char *key, + const char **items, + const dbus_uint32_t num_items) +{ + DBusMessageIter iter_dict_entry, iter_dict_val, iter_array; + dbus_uint32_t i; + + if (!_nmu_dbus_add_dict_entry_start (iter_dict, &iter_dict_entry, + key, DBUS_TYPE_ARRAY)) + return FALSE; + + if (!dbus_message_iter_open_container (&iter_dict_entry, + DBUS_TYPE_VARIANT, + DBUS_TYPE_ARRAY_AS_STRING + DBUS_TYPE_STRING_AS_STRING, + &iter_dict_val)) + return FALSE; + + if (!dbus_message_iter_open_container (&iter_dict_val, DBUS_TYPE_ARRAY, + DBUS_TYPE_BYTE_AS_STRING, &iter_array)) + return FALSE; + + for (i = 0; i < num_items; i++) + { + if (!dbus_message_iter_append_basic (&iter_array, DBUS_TYPE_STRING, + &(items[i]))) + return FALSE; + } + + if (!dbus_message_iter_close_container (&iter_dict_val, &iter_array)) + return FALSE; + + if (!_nmu_dbus_add_dict_entry_end (iter_dict, &iter_dict_entry, + &iter_dict_val)) + return FALSE; + + return TRUE; +} + +/** + * Add a string entry to the dict. + * + * @param iter_dict A valid DBusMessageIter returned from { link nmu_dbus_dict_open_write} + * @param key The key of the dict item + * @param value The string value + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_append_string (DBusMessageIter *iter_dict, + const char * key, + const char * value) +{ + if (!key || !value) return FALSE; + return _nmu_dbus_add_dict_entry_basic (iter_dict, key, DBUS_TYPE_STRING, &value); +} + +/** + * Add a byte entry to the dict. + * + * @param iter_dict A valid DBusMessageIter returned from { link nmu_dbus_dict_open_write} + * @param key The key of the dict item + * @param value The byte value + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_append_byte (DBusMessageIter *iter_dict, + const char * key, + const char value) +{ + if (!key) return FALSE; + return _nmu_dbus_add_dict_entry_basic (iter_dict, key, DBUS_TYPE_BYTE, &value); +} + +/** + * Add a boolean entry to the dict. + * + * @param iter_dict A valid DBusMessageIter returned from { link nmu_dbus_dict_open_write} + * @param key The key of the dict item + * @param value The boolean value + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_append_bool (DBusMessageIter *iter_dict, + const char * key, + const dbus_bool_t value) +{ + if (!key) return FALSE; + return _nmu_dbus_add_dict_entry_basic (iter_dict, key, DBUS_TYPE_BOOLEAN, &value); +} + +/** + * Add a 16-bit signed integer entry to the dict. + * + * @param iter_dict A valid DBusMessageIter returned from { link nmu_dbus_dict_open_write} + * @param key The key of the dict item + * @param value The 16-bit signed integer value + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_append_int16 (DBusMessageIter *iter_dict, + const char * key, + const dbus_int16_t value) +{ + if (!key) return FALSE; + return _nmu_dbus_add_dict_entry_basic (iter_dict, key, DBUS_TYPE_INT16, &value); +} + +/** + * Add a 16-bit unsigned integer entry to the dict. + * + * @param iter_dict A valid DBusMessageIter returned from { link nmu_dbus_dict_open_write} + * @param key The key of the dict item + * @param value The 16-bit unsigned integer value + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_append_uint16 (DBusMessageIter *iter_dict, + const char * key, + const dbus_uint16_t value) +{ + if (!key) return FALSE; + return _nmu_dbus_add_dict_entry_basic (iter_dict, key, DBUS_TYPE_UINT16, &value); +} + +/** + * Add a 32-bit signed integer to the dict. + * + * @param iter_dict A valid DBusMessageIter returned from { link nmu_dbus_dict_open_write} + * @param key The key of the dict item + * @param value The 32-bit signed integer value + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_append_int32 (DBusMessageIter *iter_dict, + const char * key, + const dbus_int32_t value) +{ + if (!key) return FALSE; + return _nmu_dbus_add_dict_entry_basic (iter_dict, key, DBUS_TYPE_INT32, &value); +} + +/** + * Add a 32-bit unsigned integer entry to the dict. + * + * @param iter_dict A valid DBusMessageIter returned from { link nmu_dbus_dict_open_write} + * @param key The key of the dict item + * @param value The 32-bit unsigned integer value + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_append_uint32 (DBusMessageIter *iter_dict, + const char * key, + const dbus_uint32_t value) +{ + if (!key) return FALSE; + return _nmu_dbus_add_dict_entry_basic (iter_dict, key, DBUS_TYPE_UINT32, &value); +} + +/** + * Add a 64-bit integer entry to the dict. + * + * @param iter_dict A valid DBusMessageIter returned from { link nmu_dbus_dict_open_write} + * @param key The key of the dict item + * @param value The 64-bit integer value + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_append_int64 (DBusMessageIter *iter_dict, + const char * key, + const dbus_int64_t value) +{ + if (!key) return FALSE; + return _nmu_dbus_add_dict_entry_basic (iter_dict, key, DBUS_TYPE_INT64, &value); +} + +/** + * Add a 64-bit unsigned integer entry to the dict. + * + * @param iter_dict A valid DBusMessageIter returned from { link nmu_dbus_dict_open_write} + * @param key The key of the dict item + * @param value The 64-bit unsigned integer value + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_append_uint64 (DBusMessageIter *iter_dict, + const char * key, + const dbus_uint64_t value) +{ + if (!key) return FALSE; + return _nmu_dbus_add_dict_entry_basic (iter_dict, key, DBUS_TYPE_UINT64, &value); +} + +/** + * Add a double-precision floating point entry to the dict. + * + * @param iter_dict A valid DBusMessageIter returned from { link nmu_dbus_dict_open_write} + * @param key The key of the dict item + * @param value The double-precision floating point value + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_append_double (DBusMessageIter *iter_dict, + const char * key, + const double value) +{ + if (!key) return FALSE; + return _nmu_dbus_add_dict_entry_basic (iter_dict, key, DBUS_TYPE_DOUBLE, &value); +} + +/** + * Add a DBus object path entry to the dict. + * + * @param iter_dict A valid DBusMessageIter returned from { link nmu_dbus_dict_open_write} + * @param key The key of the dict item + * @param value The DBus object path value + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_append_object_path (DBusMessageIter *iter_dict, + const char * key, + const char * value) +{ + if (!key || !value) return FALSE; + return _nmu_dbus_add_dict_entry_basic (iter_dict, key, DBUS_TYPE_OBJECT_PATH, &value); +} + +/** + * Add a byte array entry to the dict. + * + * @param iter_dict A valid DBusMessageIter returned from { link nmu_dbus_dict_open_write} + * @param key The key of the dict item + * @param value The byte array + * @param value_len The length of the byte array, in bytes + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_append_byte_array (DBusMessageIter *iter_dict, + const char * key, + const char * value, + const dbus_uint32_t value_len) +{ + if (!key) return FALSE; + if (!value && (value_len != 0)) return FALSE; + return _nmu_dbus_add_dict_entry_byte_array (iter_dict, key, value, value_len); +} + + +/** + * Add a string array entry to the dict. + * + * @param iter_dict A valid DBusMessageIter returned from { link nmu_dbus_dict_open_write} + * @param key The key of the dict item + * @param items The array of strings + * @param num_items The number of strings in the array + * @return TRUE on success, FALSE on failure + * + */ +dbus_bool_t +nmu_dbus_dict_append_string_array (DBusMessageIter *iter_dict, + const char * key, + const char ** items, + const dbus_uint32_t num_items) +{ + if (!key) return FALSE; + if (!items && (num_items != 0)) return FALSE; + return _nmu_dbus_add_dict_entry_string_array (iter_dict, key, items, num_items); +} + Index: vpnc/src/nm-utils.h =================================================================== RCS file: /cvs/gnome/NetworkManager/vpn-daemons/vpnc/src/nm-utils.h,v retrieving revision 1.2 diff -u -r1.2 nm-utils.h --- vpnc/src/nm-utils.h 16 Jan 2006 22:26:17 -0000 1.2 +++ vpnc/src/nm-utils.h 1 Nov 2006 22:35:23 -0000 @@ -128,4 +128,83 @@ gchar *nm_dbus_escape_object_path (const gchar *utf8_string); gchar *nm_dbus_unescape_object_path (const gchar *object_path); +/* + * Adding a dict to a DBusMessage + */ + +dbus_bool_t +nmu_dbus_dict_open_write (DBusMessageIter *iter, + DBusMessageIter *iter_dict); + +dbus_bool_t +nmu_dbus_dict_close_write (DBusMessageIter *iter, + DBusMessageIter *iter_dict); + +dbus_bool_t +nmu_dbus_dict_append_string (DBusMessageIter *iter_dict, + const char * key, + const char * value); + +dbus_bool_t +nmu_dbus_dict_append_byte (DBusMessageIter *iter_dict, + const char * key, + const char value); + +dbus_bool_t +nmu_dbus_dict_append_bool (DBusMessageIter *iter_dict, + const char * key, + const dbus_bool_t value); + +dbus_bool_t +nmu_dbus_dict_append_int16 (DBusMessageIter *iter_dict, + const char * key, + const dbus_int16_t value); + +dbus_bool_t +nmu_dbus_dict_append_uint16 (DBusMessageIter *iter_dict, + const char * key, + const dbus_uint16_t value); + +dbus_bool_t +nmu_dbus_dict_append_int32 (DBusMessageIter *iter_dict, + const char * key, + const dbus_int32_t value); + +dbus_bool_t +nmu_dbus_dict_append_uint32 (DBusMessageIter *iter_dict, + const char * key, + const dbus_uint32_t value); + +dbus_bool_t +nmu_dbus_dict_append_int64 (DBusMessageIter *iter_dict, + const char * key, + const dbus_int64_t value); + +dbus_bool_t +nmu_dbus_dict_append_uint64 (DBusMessageIter *iter_dict, + const char * key, + const dbus_uint64_t value); + +dbus_bool_t +nmu_dbus_dict_append_double (DBusMessageIter *iter_dict, + const char * key, + const double value); + +dbus_bool_t +nmu_dbus_dict_append_object_path (DBusMessageIter *iter_dict, + const char * key, + const char * value); + +dbus_bool_t +nmu_dbus_dict_append_byte_array (DBusMessageIter *iter_dict, + const char * key, + const char * value, + const dbus_uint32_t value_len); + +dbus_bool_t +nmu_dbus_dict_append_string_array (DBusMessageIter *iter_dict, + const char * key, + const char ** items, + const dbus_uint32_t num_items); + #endif /* NM_UTILS_H */ Index: vpnc/src/nm-vpnc-service.c =================================================================== RCS file: /cvs/gnome/NetworkManager/vpn-daemons/vpnc/src/nm-vpnc-service.c,v retrieving revision 1.19 diff -u -r1.19 nm-vpnc-service.c --- vpnc/src/nm-vpnc-service.c 21 May 2006 20:28:25 -0000 1.19 +++ vpnc/src/nm-vpnc-service.c 1 Nov 2006 22:35:24 -0000 @@ -869,31 +869,39 @@ */ static void nm_vpnc_dbus_process_helper_ip4_config (DBusConnection *con, DBusMessage *message, NmVpncData *data) { - guint32 ip4_vpn_gateway; - char * tundev; - guint32 ip4_address; - guint32 ip4_ptp_address; - guint32 ip4_netmask; - guint32 * ip4_dns; - guint32 ip4_dns_len; - guint32 * ip4_nbns; - guint32 ip4_nbns_len; - guint32 mss; + guint32 ip4_vpn_gateway; + char * tundev; + guint32 ip4_address; + guint32 ip4_ptp_address; + guint32 ip4_netmask; + guint32 * ip4_dns = NULL; + guint32 ip4_dns_len; + guint32 ip4_dns1; + guint32 ip4_dns2; + guint32 * ip4_nbns = NULL; + guint32 ip4_nbns_len; char * cisco_def_domain; - char * cisco_banner; - gboolean success = FALSE; - DBusMessage * signal; + char * cisco_banner; + guint32 ip4_nbns1; + guint32 ip4_nbns2; + guint32 mtu; + guint32 mss; + gboolean success = FALSE; + char * empty = ""; + DBusMessage *signal; + int i; + DBusMessageIter iter, iter_dict; g_return_if_fail (data != NULL); g_return_if_fail (con != NULL); g_return_if_fail (message != NULL); - + /* Only accept the config info if we're in STARTING state */ if (data->state != NM_VPN_STATE_STARTING) return; - + nm_vpnc_cancel_helper_timer (data); - + if (!dbus_message_get_args(message, NULL, DBUS_TYPE_UINT32, &ip4_vpn_gateway, DBUS_TYPE_STRING, &tundev, @@ -904,10 +912,10 @@ DBUS_TYPE_STRING, &cisco_def_domain, DBUS_TYPE_STRING, &cisco_banner, DBUS_TYPE_INVALID)) goto out; - + /* For Cisco/vpnc, PtP address == local VPN address */ ip4_ptp_address = ip4_address; - + /* and we don't specify an MSS */ mss = 0; @@ -916,27 +924,74 @@ ip4_dns, ip4_dns_len, ip4_nbns, ip4_nbns_len, cisco_def_domain, cisco_banner); #endif - + if (!(signal = dbus_message_new_signal (NM_DBUS_PATH_VPNC, NM_DBUS_INTERFACE_VPNC, NM_DBUS_VPN_SIGNAL_IP4_CONFIG))) + { + nm_warning ("Not enough memory for new dbus message!"); + goto out; + } + + dbus_message_iter_init_append (signal, &iter); + if (!nmu_dbus_dict_open_write (&iter, &iter_dict)) { + nm_warning ("dict open write failed!"); goto out; + } + + if (!nmu_dbus_dict_append_uint32 (&iter_dict, "gateway", ip4_vpn_gateway)) { + nm_warning ("couldn't append gateway to dict"); + goto out; + } + + if (!nmu_dbus_dict_append_string (&iter_dict, "tundev", tundev)) { + nm_warning ("couldn't append tundev to dict"); + goto out; + } + + if (!nmu_dbus_dict_append_uint32 (&iter_dict, "local_addr", ip4_address)) { + nm_warning ("couldn't append local_address to dict"); + goto out; + } + + if (!nmu_dbus_dict_append_uint32 (&iter_dict, "local_netmask", ip4_netmask)) { + nm_warning ("couldn't append local_netmask to dict"); + goto out; + } + + if (!nmu_dbus_dict_append_uint32 (&iter_dict, "ptp_addr", ip4_ptp_address)) { + nm_warning ("couldn't append ptp_address to dict"); + goto out; + } + + for (i=0; i < ip4_dns_len; i++) { + if (!nmu_dbus_dict_append_uint32 (&iter_dict, "dns_server", ip4_dns[i])) { + nm_warning ("couldn't append dns_server (number %d) to dict",i); + goto out; + } + } + + for (i=0; i < ip4_nbns_len; i++) { + if (!nmu_dbus_dict_append_uint32 (&iter_dict, "nbns_server", ip4_dns[i])) { + nm_warning ("couldn't append nbns_server (number %d) to dict",i); + goto out; + } + } + + if (!nmu_dbus_dict_append_string (&iter_dict, "login_banner", cisco_banner)) { + nm_warning ("couldn't append login_banner to dict"); + goto out; + } + + if (!nmu_dbus_dict_close_write (&iter, &iter_dict)) { + nm_warning ("dict close write failed!"); + goto out; + } - dbus_message_append_args (signal, - DBUS_TYPE_UINT32, &ip4_vpn_gateway, - DBUS_TYPE_STRING, &tundev, - DBUS_TYPE_UINT32, &ip4_address, - DBUS_TYPE_UINT32, &ip4_ptp_address, - DBUS_TYPE_UINT32, &ip4_netmask, - DBUS_TYPE_ARRAY, DBUS_TYPE_UINT32, &ip4_dns, ip4_dns_len, - DBUS_TYPE_ARRAY, DBUS_TYPE_UINT32, &ip4_nbns, ip4_nbns_len, - DBUS_TYPE_UINT32, &mss, - DBUS_TYPE_STRING, &cisco_def_domain, - DBUS_TYPE_STRING, &cisco_banner, DBUS_TYPE_INVALID); if (!dbus_connection_send (data->con, signal, NULL)) { nm_warning ("Could not raise the "NM_DBUS_VPN_SIGNAL_IP4_CONFIG" signal!"); goto out; } - + dbus_message_unref (signal); nm_vpnc_set_state (data, NM_VPN_STATE_STARTED); success = TRUE; @@ -944,7 +999,7 @@ out: if (!success) { - nm_warning ("Received invalid IP4 Config information from helper, terminating vpnc."); + nm_warning ("Received invalid IP4 Config information from helper, terminating vpnc."); nm_vpnc_dbus_handle_stop_vpn (data); } }
Attachment:
signature.asc
Description: OpenPGP digital signature