Commit 0790d2fc authored by Ray Strode's avatar Ray Strode
Browse files

2005-03-11 Ray Strode <rstrode@redhat.com>

	Third (unfinished, partially working) cut at porting to
	dbus 0.30 api and new hal.

	* info-daemon/NetworkManagerInfoDbus.c:
		don't free null arrays.

	* panel-applet/NMWirelessAppletDbus.c:
	* src/nm-dbus-device.c:
	* src/nm-dbus-net.c:
	* src/NetworkManagerDbus.c: more
 	STRING -> OBJECT_PATH fun
	* src/NetworkManagerDevice.c:
	* src/NetworkManagerDevice.h:
	(rename nm_device_get_link_active): rename to
	nm_device_has_active_link
	(nm_device_wireless_link_active): rename to
	nm_device_probe_wireless_link_state
	(nm_device_wired_link_active): rename to
	nm_device_probe_wired_link_state.  Rewrite to
	use carrier file since hal doesn't maintain
	link state anymore.
	(nm_device_update_link_active): rename to
	nm_device_update_link_state
	* src/NetworkManagerPolicy.c
	  (nm_policy_activation_finish): check for NULL
	  MAC address.

	* src/Makefile.am:
	* src/NetworkManagerMain.h:
	* src/NetworkManager.c:
	* src/nm-netlink-monitor.c:
	* src/nm-netlink-monitor.h: New class to support
	monitoring wired ethernet link status, since HAL
	doesn't export that information anymore.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@495 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 587a50e6
2005-03-11 Ray Strode <rstrode@redhat.com>
Third (unfinished, partially working) cut at porting to
dbus 0.30 api and new hal.
* info-daemon/NetworkManagerInfoDbus.c:
don't free null arrays.
* panel-applet/NMWirelessAppletDbus.c:
* src/nm-dbus-device.c:
* src/nm-dbus-net.c:
* src/NetworkManagerDbus.c: more
STRING -> OBJECT_PATH fun
* src/NetworkManagerDevice.c:
* src/NetworkManagerDevice.h:
(rename nm_device_get_link_active): rename to
nm_device_has_active_link
(nm_device_wireless_link_active): rename to
nm_device_probe_wireless_link_state
(nm_device_wired_link_active): rename to
nm_device_probe_wired_link_state. Rewrite to
use carrier file since hal doesn't maintain
link state anymore.
(nm_device_update_link_active): rename to
nm_device_update_link_state
* src/NetworkManagerPolicy.c
(nm_policy_activation_finish): check for NULL
MAC address.
* src/Makefile.am:
* src/NetworkManagerMain.h:
* src/NetworkManager.c:
* src/nm-netlink-monitor.c:
* src/nm-netlink-monitor.h: New class to support
monitoring wired ethernet link status, since HAL
doesn't export that information anymore.
2005-03-09 Ray Strode <rstrode@redhat.com>
Second (unfinished, unworking) cut at porting to
dbus 0.30 api.
* dispatcher-daemon/NetworkManagerDispatcher.c
* dispatcher-daemon/NetworkManagerDispatcher.c:
* info-daemon/NetworkManagerInfoDbus.c:
* panel-applet/NMWirelessAppletDbus.c:
* src/NetworkManagerDbusUtils.c:
......
......@@ -482,7 +482,9 @@ static DBusMessage *nmi_dbus_get_network_properties (NMIAppInfo *info, DBusMessa
dbus_message_iter_close_container (&iter, &array_iter);
}
gconf_value_free (ap_addrs_value);
if (ap_addrs_value != NULL)
gconf_value_free (ap_addrs_value);
g_free (essid);
g_free (key);
......
......@@ -72,7 +72,7 @@ static int nmwa_dbus_call_nm_method (DBusConnection *con, const char *path, cons
g_return_val_if_fail (*arg == NULL, RETURN_FAILURE);
if ((arg_type == NM_DBUS_TYPE_STRING_ARRAY) ||
(arg_type == NM_DBUS_TYPE_OBJECT_PATH_ARRAY))
(arg_type == NM_DBUS_TYPE_OBJECT_PATH_ARRAY))
{
g_return_val_if_fail (item_count != NULL, RETURN_FAILURE);
*item_count = 0;
......@@ -102,7 +102,7 @@ static int nmwa_dbus_call_nm_method (DBusConnection *con, const char *path, cons
ret = RETURN_SUCCESS;
if ((ret != RETURN_SUCCESS) && (ret != RETURN_NO_NM))
fprintf (stderr, "nmwa_dbus_call_nm_method(): %s raised:\n %s\n\n", error.name, error.message);
fprintf (stderr, "nmwa_dbus_call_nm_method(): %s raised on method '%s':\n %s\n\n", error.name, method, error.message);
dbus_error_free (&error);
return (ret);
......@@ -155,6 +155,7 @@ static int nmwa_dbus_call_nm_method (DBusConnection *con, const char *path, cons
switch (arg_type)
{
/*
case DBUS_TYPE_OBJECT_PATH:
*((char **)(arg)) = nm_dbus_unescape_object_path (dbus_string);
break;
......@@ -170,9 +171,12 @@ static int nmwa_dbus_call_nm_method (DBusConnection *con, const char *path, cons
*item_count = num_items;
break;
}
*/
case DBUS_TYPE_OBJECT_PATH:
case DBUS_TYPE_STRING:
*((char **)(arg)) = g_strdup (dbus_string);
break;
case NM_DBUS_TYPE_OBJECT_PATH_ARRAY:
case NM_DBUS_TYPE_STRING_ARRAY:
*((char ***)(arg)) = g_strdupv (dbus_array);
*item_count = num_items;
......@@ -234,7 +238,7 @@ static char * nmwa_dbus_get_active_network (NMWirelessApplet *applet, char *dev_
{
char *network = NULL;
switch (nmwa_dbus_call_nm_method (applet->connection, dev_path, "getActiveNetwork", DBUS_TYPE_STRING, (void **)(&network), NULL))
switch (nmwa_dbus_call_nm_method (applet->connection, dev_path, "getActiveNetwork", DBUS_TYPE_OBJECT_PATH, (void **)(&network), NULL))
{
case (RETURN_NO_NM):
applet->applet_state = APPLET_STATE_NO_NM;
......@@ -685,7 +689,7 @@ void nmwa_dbus_set_device (DBusConnection *connection, const NetworkDevice *dev,
if (passphrase == NULL)
passphrase = "";
dbus_message_append_args (message, DBUS_TYPE_STRING, &dev->nm_device,
dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev->nm_device,
DBUS_TYPE_STRING, &network->essid,
DBUS_TYPE_STRING, &passphrase,
DBUS_TYPE_INT32, &key_type,
......@@ -1261,8 +1265,8 @@ static void nmwa_dbus_device_update_one_network (NMWirelessApplet *applet, DBusM
dbus_error_init (&error);
/* Try first time with strength, which is only passed for NETWORK_STATUS_STRENGTH_CHANGED */
if (!dbus_message_get_args (message, &error,
DBUS_TYPE_STRING, &dev_path,
DBUS_TYPE_STRING, &net_path,
DBUS_TYPE_OBJECT_PATH, &dev_path,
DBUS_TYPE_OBJECT_PATH, &net_path,
DBUS_TYPE_UINT32, &status,
DBUS_TYPE_INT32, &strength,
DBUS_TYPE_INVALID))
......@@ -1273,8 +1277,8 @@ static void nmwa_dbus_device_update_one_network (NMWirelessApplet *applet, DBusM
/* Try without strength */
if (!dbus_message_get_args (message, &error,
DBUS_TYPE_STRING, &dev_path,
DBUS_TYPE_STRING, &net_path,
DBUS_TYPE_OBJECT_PATH, &dev_path,
DBUS_TYPE_OBJECT_PATH, &net_path,
DBUS_TYPE_UINT32, &status,
DBUS_TYPE_INVALID))
{
......
......@@ -38,6 +38,8 @@ NetworkManager_SOURCES = \
NetworkManagerWireless.h \
NetworkManagerSystem.c \
NetworkManagerSystem.h \
nm-netlink-monitor.c \
nm-netlink-monitor.h \
autoip.c
NetworkManager_CPPFLAGS = \
......
......@@ -43,7 +43,9 @@
#include "NetworkManagerAPList.h"
#include "NetworkManagerSystem.h"
#include "nm-named-manager.h"
#include "nm-netlink-monitor.h"
#define NM_WIRELESS_LINK_STATE_POLL_INTERVAL (5 * 1000)
/*
* Globals
......@@ -54,13 +56,9 @@ static gboolean sigterm_pipe_handler (GIOChannel *src, GIOCondition condition, g
static void sigterm_handler (int signum);
static void nm_data_free (NMData *data);
/*
* nm_get_device_interface_from_hal
*
* Queries HAL for the "net.interface" property of a device and returns
* it if successful.
*
*/
static char *nm_get_device_interface_from_hal (LibHalContext *ctx, const char *udi)
{
......@@ -95,7 +93,7 @@ static char *nm_get_device_interface_from_hal (LibHalContext *ctx, const char *u
* NULL on failure
*/
NMDevice * nm_create_device_and_add_to_list (NMData *data, const char *udi, const char *iface,
gboolean test_device, NMDeviceType test_device_type)
gboolean test_device, NMDeviceType test_device_type)
{
NMDevice *dev = NULL;
......@@ -110,7 +108,7 @@ NMDevice * nm_create_device_and_add_to_list (NMData *data, const char *udi, cons
if (!data->enable_test_devices && test_device)
{
syslog (LOG_ERR, "nm_create_device_and_add_to_list(): attempt to create a test device,"
" but test devices were not enabled on the command line. Will not create the device.\n");
" but test devices were not enabled on the command line. Will not create the device.\n");
return (NULL);
}
......@@ -131,6 +129,8 @@ NMDevice * nm_create_device_and_add_to_list (NMData *data, const char *udi, cons
data->dev_list = g_slist_append (data->dev_list, dev);
nm_device_deactivate (dev, TRUE);
nm_device_update_link_state (dev);
nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
nm_policy_schedule_state_update (data);
......@@ -139,11 +139,11 @@ NMDevice * nm_create_device_and_add_to_list (NMData *data, const char *udi, cons
else
{
/* If we couldn't add the device to our list, free its data. */
syslog( LOG_ERR, "nm_create_device_and_add_to_list() could not acquire device list mutex." );
syslog ( LOG_ERR, "nm_create_device_and_add_to_list() could not acquire device list mutex." );
nm_device_unref (dev);
dev = NULL;
}
} else syslog( LOG_ERR, "nm_create_device_and_add_to_list() could not allocate device data." );
} else syslog ( LOG_ERR, "nm_create_device_and_add_to_list() could not allocate device data." );
return (dev);
}
......@@ -194,7 +194,7 @@ void nm_remove_device_from_list (NMData *data, const char *udi)
}
}
nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
} else syslog( LOG_ERR, "nm_remove_device_from_list() could not acquire device list mutex." );
} else syslog ( LOG_ERR, "nm_remove_device_from_list() could not acquire device list mutex." );
}
/* Hal doesn't really give us any way to pass a GMainContext to our
......@@ -212,7 +212,6 @@ static void nm_hal_mainloop_integration (LibHalContext *ctx, DBusConnection * db
dbus_connection_setup_with_g_main (dbus_connection, main_context);
}
/*
* nm_hal_device_added
*
......@@ -224,7 +223,7 @@ static void nm_hal_device_added (LibHalContext *ctx, const char *udi)
g_return_if_fail (data != NULL);
syslog( LOG_DEBUG, "New device added (hal udi is '%s').", udi );
syslog ( LOG_DEBUG, "New device added (hal udi is '%s').", udi );
/* Sometimes the device's properties (like net.interface) are not set up yet,
* so this call will fail, and it will actually be added when hal sets the device's
......@@ -248,7 +247,7 @@ static void nm_hal_device_removed (LibHalContext *ctx, const char *udi)
g_return_if_fail (data != NULL);
syslog( LOG_DEBUG, "Device removed (hal udi is '%s').", udi );
syslog ( LOG_DEBUG, "Device removed (hal udi is '%s').", udi );
nm_remove_device_from_list (data, udi);
}
......@@ -264,7 +263,7 @@ static void nm_hal_device_new_capability (LibHalContext *ctx, const char *udi, c
g_return_if_fail (data != NULL);
/*syslog( LOG_DEBUG, "nm_hal_device_new_capability() called with udi = %s, capability = %s", udi, capability );*/
/*syslog ( LOG_DEBUG, "nm_hal_device_new_capability() called with udi = %s, capability = %s", udi, capability );*/
if (capability && ((strcmp (capability, "net.80203") == 0) || (strcmp (capability, "net.80211") == 0)))
{
......@@ -285,67 +284,9 @@ static void nm_hal_device_new_capability (LibHalContext *ctx, const char *udi, c
*/
static void nm_hal_device_lost_capability (LibHalContext *ctx, const char *udi, const char *capability)
{
/* syslog( LOG_DEBUG, "nm_hal_device_lost_capability() called with udi = %s, capability = %s", udi, capability );*/
}
/*
* nm_hal_device_property_modified
*
*/
static void nm_hal_device_property_modified (LibHalContext *ctx, const char *udi, const char *key, dbus_bool_t is_removed, dbus_bool_t is_added)
{
NMData *data = (NMData *)libhal_ctx_get_user_data (ctx);
gboolean link = FALSE;
g_return_if_fail (data != NULL);
g_return_if_fail (udi != NULL);
g_return_if_fail (key != NULL);
/*syslog (LOG_DEBUG, "nm_hal_device_property_modified() called with udi = %s, key = %s, is_removed = %d, is_added = %d", udi, key, is_removed, is_added);*/
/* Only accept wired ethernet link changes for now */
if (is_removed || (strcmp (key, "net.80203.link") != 0))
return;
if (!libhal_device_property_exists (ctx, udi, "net.80203.link", NULL))
return;
link = libhal_device_get_property_bool (ctx, udi, "net.80203.link", NULL);
/* Attempt to acquire mutex for device link updating. If acquire fails ignore the event. */
if (nm_try_acquire_mutex (data->dev_list_mutex, __FUNCTION__))
{
NMDevice *dev = NULL;
if ((dev = nm_get_device_by_udi (data, udi)) && nm_device_is_wired (dev))
{
syslog (LOG_DEBUG, "HAL signaled link state change for device %s.", nm_device_get_iface (dev));
nm_device_update_link_active (dev);
/* If the currently active device is locked and wireless, and the wired
* device we just received this property change event for now has a link
* state of TRUE, we want to clear the active device lock so that we switch
* from wireless to wired on the next state update.
*
* This happens when the user has explicitly chosen a wireless network at
* some point, and then comes back and plugs the wired cable in. Due to the
* active device lock we wouldn't switch back to wired automatically, but
* this fixes that behavior.
*/
if ( nm_device_get_link_active (dev)
&& data->active_device
&& data->active_device_locked
&& nm_device_is_wireless (data->active_device))
{
data->active_device_locked = FALSE;
nm_policy_schedule_state_update (data);
}
}
nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
} else syslog( LOG_ERR, "nm_hal_device_property_modified() could not acquire device list mutex." );
/* syslog ( LOG_DEBUG, "nm_hal_device_lost_capability() called with udi = %s, capability = %s", udi, capability );*/
}
/*
* nm_add_initial_devices
*
......@@ -424,16 +365,14 @@ void nm_schedule_status_signal_broadcast (NMData *data)
/*
* nm_link_state_monitor
* nm_poll_and_update_wireless_link_state
*
* Called every 2s to poll cards and determine if they have a link
* Called every 2s to poll wireless cards and determine if they have a link
* or not.
*
*/
gboolean nm_link_state_monitor (gpointer user_data)
gboolean nm_poll_and_update_wireless_link_state (NMData *data)
{
NMData *data = (NMData *)user_data;
g_return_val_if_fail (data != NULL, TRUE);
/* Attempt to acquire mutex for device list iteration.
......@@ -446,39 +385,26 @@ gboolean nm_link_state_monitor (gpointer user_data)
{
NMDevice *dev = (NMDevice *)(elt->data);
if (dev)
if (dev && nm_device_is_wireless (dev))
{
if (!nm_device_is_up (dev))
nm_device_bring_up (dev);
nm_device_update_link_active (dev);
if (dev == data->active_device)
{
if (nm_device_is_wireless (dev) && !nm_device_get_link_active (dev))
{
/* If we loose a link to the access point, then
* look for another access point to connect to.
*/
nm_device_update_best_ap (dev);
}
}
else
{
/* Ensure that the device has no IP address or routes. This will
* sometimes occur when a card gets inserted, and the system
* initscripts will run to bring the card up, but they get around to
* running _after_ we've been notified of insertion and cleared out
* card info already.
*/
nm_system_device_flush_routes (dev);
if (nm_device_get_ip4_address (dev) != 0)
nm_system_device_flush_addresses (dev);
}
nm_device_update_link_state (dev);
/* Is this the currently selected device?
* If so, let's make sure it's still has
* an active link. If it lost the link,
* find a better access point.
*/
if ((dev == data->active_device) &&
!nm_device_has_active_link (dev))
nm_device_update_best_ap (dev);
}
}
nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
} else syslog( LOG_ERR, "nm_link_state_monitor() could not acquire device list mutex." );
} else syslog ( LOG_ERR, "nm_poll_and_update_wireless_link_state() could not acquire device list mutex." );
return (TRUE);
}
......@@ -623,6 +549,114 @@ static void nm_print_usage (void)
"\n");
}
static void
nm_monitor_wireless_link_state (NMData *data)
{
GSource *link_source;
link_source = g_timeout_source_new (NM_WIRELESS_LINK_STATE_POLL_INTERVAL);
g_source_set_callback (link_source,
(GSourceFunc) nm_poll_and_update_wireless_link_state,
nm_data, NULL);
g_source_attach (link_source, nm_data->main_context);
g_source_unref (link_source);
}
static void
nm_wired_link_activated (NmNetlinkMonitor *monitor,
const gchar *interface_name,
NMData *data)
{
NMDevice *device;
if (nm_try_acquire_mutex (data->dev_list_mutex, __FUNCTION__))
{
device = nm_get_device_by_iface (data, interface_name);
if (device != NULL)
{
nm_device_set_link_active (device, TRUE);
if (nm_device_has_active_link (device)
&& data->active_device
&& data->active_device_locked
&& nm_device_is_wireless (data->active_device))
{
data->active_device_locked = FALSE;
nm_policy_schedule_state_update (data);
}
}
else
syslog (LOG_ERR, "unknown wired ethernet interface '%s' activated\n",
interface_name);
nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
}
}
static void
nm_wired_link_deactivated (NmNetlinkMonitor *monitor,
const gchar *interface_name,
NMData *data)
{
NMDevice *device;
if (nm_try_acquire_mutex (data->dev_list_mutex, __FUNCTION__))
{
device = nm_get_device_by_iface (data, interface_name);
if (device != NULL)
nm_device_set_link_active (device, FALSE);
else
syslog (LOG_ERR, "unknown wired ethernet interface '%s' "
"deactivated\n", interface_name);
nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
}
}
static void
nm_error_monitoring_wired_link_state (NmNetlinkMonitor *monitor,
GError *error,
NMData *data)
{
/* FIXME: Try to handle the error instead of just printing it.
*/
syslog (LOG_ERR, "error monitoring wired ethernet link state: %s\n",
error->message);
}
static void
nm_monitor_wired_link_state (NMData *data)
{
GError *error;
NmNetlinkMonitor *monitor;
monitor = nm_netlink_monitor_new ();
error = NULL;
nm_netlink_monitor_open_connection (monitor, &error);
if (error != NULL)
{
syslog (LOG_ERR, "could not monitor wired ethernet devices: %s",
error->message);
g_error_free (error);
g_object_unref (monitor);
return;
}
g_signal_connect (G_OBJECT (monitor), "interface-connected",
G_CALLBACK (nm_wired_link_activated), data);
g_signal_connect (G_OBJECT (monitor), "interface-disconnected",
G_CALLBACK (nm_wired_link_deactivated), data);
g_signal_connect (G_OBJECT (monitor), "error",
G_CALLBACK (nm_error_monitoring_wired_link_state),
data);
nm_netlink_monitor_attach (monitor, data->main_context);
data->netlink_monitor = monitor;
}
/*
* main
......@@ -766,8 +800,6 @@ int main( int argc, char *argv[] )
nm_hal_device_new_capability);
libhal_ctx_set_device_lost_capability (ctx,
nm_hal_device_lost_capability);
libhal_ctx_set_device_property_modified (ctx,
nm_hal_device_property_modified);
libhal_device_property_watch_all (nm_data->hal_ctx, &dbus_error);
......@@ -789,10 +821,9 @@ int main( int argc, char *argv[] )
/* Bring up the loopback interface. */
nm_system_enable_loopback ();
/* Create a watch function that monitors cards for link status. */
link_source = g_timeout_source_new (5000);
g_source_set_callback (link_source, nm_link_state_monitor, nm_data, NULL);
link_source_id = g_source_attach (link_source, nm_data->main_context);
/* Create watch functions that monitor cards for link status. */
nm_monitor_wireless_link_state (nm_data);
nm_monitor_wired_link_state (nm_data);
if (!nm_named_manager_start (nm_data->named, &error))
{
......@@ -803,9 +834,6 @@ int main( int argc, char *argv[] )
/* Wheeee!!! */
g_main_loop_run (nm_data->main_loop);
/* Kill the watch functions */
g_source_remove (link_source_id);
/* Cleanup */
if (libhal_ctx_shutdown (nm_data->hal_ctx, &dbus_error) != 0) {
syslog (LOG_NOTICE, "Error: libhal shutdown failed - %s", dbus_error.message);
......
......@@ -39,6 +39,7 @@
#include "nm-dbus-device.h"
#include "nm-dbus-net.h"
#include "nm-dbus-dhcp.h"
#include "nm-utils.h"
/*
......@@ -75,9 +76,15 @@ DBusMessage *nm_dbus_create_error_message (DBusMessage *message, const char *exc
*/
static unsigned char * nm_dbus_get_object_path_from_device (NMDevice *dev)
{
char *object_path, *escaped_object_path;
g_return_val_if_fail (dev != NULL, NULL);
return (g_strdup_printf ("%s/%s", NM_DBUS_PATH_DEVICES, nm_device_get_iface (dev)));
object_path = g_strdup_printf ("%s/%s", NM_DBUS_PATH_DEVICES, nm_device_get_iface (dev));
escaped_object_path = nm_dbus_escape_object_path (object_path);
g_free (object_path);
return escaped_object_path;
}
......@@ -106,15 +113,21 @@ NMDevice *nm_dbus_get_device_from_object_path (NMData *data, const char *path)
{
GSList *elt;
char compare_path[100];
char *escaped_compare_path;
for (elt = data->dev_list; elt; elt = g_slist_next (elt))
{
if ((dev = (NMDevice *)(elt->data)))
{
snprintf (compare_path, 100, "%s/%s", NM_DBUS_PATH_DEVICES, nm_device_get_iface (dev));
escaped_compare_path = nm_dbus_escape_object_path (compare_path);
/* Compare against our constructed path, but ignore any trailing elements */
if (strncmp (path, compare_path, strlen (compare_path)) == 0)
if (strncmp (path, compare_path, strlen (escaped_compare_path)) == 0)
{
g_free (escaped_compare_path);
break;
}
g_free (escaped_compare_path);
dev = NULL;
}
}
......@@ -298,11 +311,11 @@ void nm_dbus_signal_device_status_change (DBusConnection *connection, NMDevice *
if (ap && nm_ap_get_essid (ap)) {
const char *essid;
essid = nm_ap_get_essid (ap);
dbus_message_append_args (message, DBUS_TYPE_STRING, &dev_path,
dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path,
DBUS_TYPE_STRING, &essid,
DBUS_TYPE_INVALID);
} else
dbus_message_append_args (message, DBUS_TYPE_STRING, &dev_path, DBUS_TYPE_INVALID);
dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_INVALID);
if (ap)
nm_ap_unref (ap);
......@@ -405,7 +418,7 @@ void nm_dbus_signal_device_ip4_address_change (DBusConnection *connection, NMDev
return;
}
dbus_message_append_args (message, DBUS_TYPE_STRING, &dev_path, DBUS_TYPE_INVALID);
dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_INVALID);
g_free (dev_path);
if (!dbus_connection_send (connection, message, NULL))
......@@ -451,8 +464,8 @@ void nm_dbus_signal_wireless_network_change (DBusConnection *connection, NMDevic
}
dbus_message_append_args (message,
DBUS_TYPE_STRING, &dev_path,
DBUS_TYPE_STRING, &ap_path,
DBUS_TYPE_OBJECT_PATH, &dev_path,
DBUS_TYPE_OBJECT_PATH, &ap_path,
DBUS_TYPE_UINT32, &status,
DBUS_TYPE_INVALID);
g_free (ap_path);
......@@ -548,9 +561,9 @@ NMAccessPoint *nm_dbus_get_network_object (DBusConnection *connection, NMNetwork
DBusMessage *reply;
NMAccessPoint *ap = NULL;
char *essid = NULL;
const char *essid = NULL;
gint timestamp_secs = -1;
char *key = NULL;
const char *key = NULL;
NMEncKeyType key_type = -1;
gboolean trusted = FALSE;
NMDeviceAuthMethod auth_method = NM_DEVICE_AUTH_METHOD_UNKNOWN;
......@@ -589,6 +602,9 @@ NMAccessPoint *nm_dbus_get_network_object (DBusConnection *connection, NMNetwork
goto out;