2007-09-10 Dan Williams <dcbw@redhat.com>
* NetworkManagerAP.c NetworkManagerAP.h NetworkManagerPolicy.c NetworkManagerSystem.c NetworkManagerUtils.c NetworkManagerUtils.h nm-device-802-11-wireless.c nm-device-802-3-ethernet.c nm-hal-manager.c nm-manager.c vpn-manager/nm-dbus-vpn.c - Warning fixes; casts and removal of unused variables git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2779 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
15
ChangeLog
15
ChangeLog
@@ -1,3 +1,18 @@
|
|||||||
|
2007-09-10 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* NetworkManagerAP.c
|
||||||
|
NetworkManagerAP.h
|
||||||
|
NetworkManagerPolicy.c
|
||||||
|
NetworkManagerSystem.c
|
||||||
|
NetworkManagerUtils.c
|
||||||
|
NetworkManagerUtils.h
|
||||||
|
nm-device-802-11-wireless.c
|
||||||
|
nm-device-802-3-ethernet.c
|
||||||
|
nm-hal-manager.c
|
||||||
|
nm-manager.c
|
||||||
|
vpn-manager/nm-dbus-vpn.c
|
||||||
|
- Warning fixes; casts and removal of unused variables
|
||||||
|
|
||||||
2007-09-10 Dan Williams <dcbw@redhat.com>
|
2007-09-10 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* include/NetworkManager.h
|
* include/NetworkManager.h
|
||||||
|
@@ -449,7 +449,7 @@ foreach_property_cb (gpointer key, gpointer value, gpointer user_data)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
ssid = g_byte_array_sized_new (len);
|
ssid = g_byte_array_sized_new (len);
|
||||||
g_byte_array_append (ssid, array->data, len);
|
g_byte_array_append (ssid, (const guint8 *) array->data, len);
|
||||||
nm_ap_set_ssid (ap, ssid);
|
nm_ap_set_ssid (ap, ssid);
|
||||||
g_byte_array_free (ssid, TRUE);
|
g_byte_array_free (ssid, TRUE);
|
||||||
} else if (!strcmp (key, "bssid")) {
|
} else if (!strcmp (key, "bssid")) {
|
||||||
@@ -1202,7 +1202,7 @@ nm_ap_check_compatible (NMAccessPoint *self,
|
|||||||
|
|
||||||
struct cf_pair {
|
struct cf_pair {
|
||||||
guint32 chan;
|
guint32 chan;
|
||||||
double freq;
|
guint32 freq;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct cf_pair cf_table[46] = {
|
static struct cf_pair cf_table[46] = {
|
||||||
@@ -1257,7 +1257,7 @@ static struct cf_pair cf_table[46] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
guint32
|
guint32
|
||||||
freq_to_channel (double freq)
|
freq_to_channel (guint32 freq)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
@@ -1266,7 +1266,7 @@ freq_to_channel (double freq)
|
|||||||
return cf_table[i].chan;
|
return cf_table[i].chan;
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
guint32
|
||||||
channel_to_freq (guint32 channel)
|
channel_to_freq (guint32 channel)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
@@ -129,7 +129,7 @@ void nm_ap_print_self (NMAccessPoint *ap, const char * prefix);
|
|||||||
*/
|
*/
|
||||||
gboolean nm_ap_has_manufacturer_default_ssid (NMAccessPoint *ap);
|
gboolean nm_ap_has_manufacturer_default_ssid (NMAccessPoint *ap);
|
||||||
|
|
||||||
guint32 freq_to_channel (double freq);
|
guint32 freq_to_channel (guint32 freq);
|
||||||
double channel_to_freq (guint32 channel);
|
guint32 channel_to_freq (guint32 channel);
|
||||||
|
|
||||||
#endif /* NM_ACCESS_POINT_H */
|
#endif /* NM_ACCESS_POINT_H */
|
||||||
|
@@ -151,7 +151,6 @@ nm_policy_auto_get_best_device (NMPolicy *policy,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
|
||||||
if (FALSE) {
|
if (FALSE) {
|
||||||
char * con_name = g_strdup ("(none)");
|
char * con_name = g_strdup ("(none)");
|
||||||
|
|
||||||
@@ -449,8 +448,6 @@ connection_added (NMManager *manager,
|
|||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
NMPolicy *policy = (NMPolicy *) user_data;
|
|
||||||
|
|
||||||
nm_info ("connection %p added", connection);
|
nm_info ("connection %p added", connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -459,8 +456,6 @@ connection_removed (NMManager *manager,
|
|||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
NMPolicy *policy = (NMPolicy *) user_data;
|
|
||||||
|
|
||||||
nm_info ("connection %p removed", connection);
|
nm_info ("connection %p removed", connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -440,7 +440,7 @@ gboolean nm_system_device_set_up_down (NMDevice *dev, gboolean up)
|
|||||||
gboolean nm_system_device_set_up_down_with_iface (const char *iface, gboolean up)
|
gboolean nm_system_device_set_up_down_with_iface (const char *iface, gboolean up)
|
||||||
{
|
{
|
||||||
gboolean success = FALSE;
|
gboolean success = FALSE;
|
||||||
guint32 index;
|
guint32 idx;
|
||||||
struct rtnl_link * request = NULL;
|
struct rtnl_link * request = NULL;
|
||||||
struct rtnl_link * old = NULL;
|
struct rtnl_link * old = NULL;
|
||||||
|
|
||||||
@@ -454,8 +454,8 @@ gboolean nm_system_device_set_up_down_with_iface (const char *iface, gboolean up
|
|||||||
else
|
else
|
||||||
rtnl_link_unset_flags (request, IFF_UP);
|
rtnl_link_unset_flags (request, IFF_UP);
|
||||||
|
|
||||||
index = nm_netlink_iface_to_index (iface);
|
idx = nm_netlink_iface_to_index (iface);
|
||||||
old = nm_netlink_index_to_rtnl_link (index);
|
old = nm_netlink_index_to_rtnl_link (idx);
|
||||||
if (old) {
|
if (old) {
|
||||||
struct nl_handle * nlh = nm_netlink_get_default_handle ();
|
struct nl_handle * nlh = nm_netlink_get_default_handle ();
|
||||||
rtnl_link_change (nlh, old, request, 0);
|
rtnl_link_change (nlh, old, request, 0);
|
||||||
|
@@ -593,13 +593,13 @@ nm_utils_is_empty_ssid (const char * ssid, int len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
nm_utils_escape_ssid (const char * ssid, guint32 len)
|
nm_utils_escape_ssid (const guint8 * ssid, guint32 len)
|
||||||
{
|
{
|
||||||
static char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
|
static char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
|
||||||
const char *s = ssid;
|
const guint8 *s = ssid;
|
||||||
char *d = escaped;
|
char *d = escaped;
|
||||||
|
|
||||||
if (nm_utils_is_empty_ssid (ssid, len)) {
|
if (nm_utils_is_empty_ssid ((const char *) ssid, len)) {
|
||||||
memcpy (escaped, "<hidden>", sizeof ("<hidden>"));
|
memcpy (escaped, "<hidden>", sizeof ("<hidden>"));
|
||||||
return escaped;
|
return escaped;
|
||||||
}
|
}
|
||||||
|
@@ -107,7 +107,7 @@ struct nl_addr * nm_utils_ip4_addr_to_nl_addr (guint32 ip4_addr);
|
|||||||
int nm_utils_ip4_netmask_to_prefix (guint32 ip4_netmask);
|
int nm_utils_ip4_netmask_to_prefix (guint32 ip4_netmask);
|
||||||
|
|
||||||
gboolean nm_utils_is_empty_ssid (const char * ssid, int len);
|
gboolean nm_utils_is_empty_ssid (const char * ssid, int len);
|
||||||
const char * nm_utils_escape_ssid (const char *ssid, guint32 len);
|
const char * nm_utils_escape_ssid (const guint8 *ssid, guint32 len);
|
||||||
|
|
||||||
gboolean nm_utils_same_ssid (const GByteArray * ssid1,
|
gboolean nm_utils_same_ssid (const GByteArray * ssid1,
|
||||||
const GByteArray * ssid2,
|
const GByteArray * ssid2,
|
||||||
|
@@ -49,6 +49,10 @@ static gboolean impl_device_get_active_networks (NMDevice80211Wireless *device,
|
|||||||
GPtrArray **networks,
|
GPtrArray **networks,
|
||||||
GError **err);
|
GError **err);
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
static void nm_device_802_11_wireless_ap_list_print (NMDevice80211Wireless *self);
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "nm-device-802-11-wireless-glue.h"
|
#include "nm-device-802-11-wireless-glue.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -140,12 +144,6 @@ static int wireless_qual_to_percent (const struct iw_quality *qual,
|
|||||||
const struct iw_quality *max_qual,
|
const struct iw_quality *max_qual,
|
||||||
const struct iw_quality *avg_qual);
|
const struct iw_quality *avg_qual);
|
||||||
|
|
||||||
static gboolean is_associated (NMDevice80211Wireless *self);
|
|
||||||
|
|
||||||
static gboolean link_to_specific_ap (NMDevice80211Wireless *self,
|
|
||||||
NMAccessPoint *ap,
|
|
||||||
gboolean default_link);
|
|
||||||
|
|
||||||
static void cleanup_association_attempt (NMDevice80211Wireless * self,
|
static void cleanup_association_attempt (NMDevice80211Wireless * self,
|
||||||
gboolean disconnect);
|
gboolean disconnect);
|
||||||
|
|
||||||
@@ -231,7 +229,7 @@ nm_device_802_11_wireless_update_bssid (NMDevice80211Wireless *self,
|
|||||||
nm_debug ("Roamed from BSSID %s to %s on wireless network '%s'",
|
nm_debug ("Roamed from BSSID %s to %s on wireless network '%s'",
|
||||||
old_addr,
|
old_addr,
|
||||||
new_addr,
|
new_addr,
|
||||||
nm_utils_escape_ssid ((const char *) old_ssid->data, old_ssid->len));
|
nm_utils_escape_ssid (old_ssid->data, old_ssid->len));
|
||||||
|
|
||||||
nm_ap_set_address (ap, &new_bssid);
|
nm_ap_set_address (ap, &new_bssid);
|
||||||
|
|
||||||
@@ -630,7 +628,6 @@ static void
|
|||||||
real_deactivate_quickly (NMDevice *dev)
|
real_deactivate_quickly (NMDevice *dev)
|
||||||
{
|
{
|
||||||
NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
|
NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
|
||||||
NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
|
|
||||||
|
|
||||||
cleanup_association_attempt (self, TRUE);
|
cleanup_association_attempt (self, TRUE);
|
||||||
|
|
||||||
@@ -706,8 +703,6 @@ real_get_best_connection (NMDevice *dev,
|
|||||||
NMManager *manager = nm_manager_get ();
|
NMManager *manager = nm_manager_get ();
|
||||||
GSList *connections = NULL;
|
GSList *connections = NULL;
|
||||||
BestConnectionInfo find_info;
|
BestConnectionInfo find_info;
|
||||||
guint32 caps;
|
|
||||||
gboolean link_active;
|
|
||||||
|
|
||||||
/* System connections first */
|
/* System connections first */
|
||||||
connections = nm_manager_get_connections (manager, NM_CONNECTION_TYPE_SYSTEM);
|
connections = nm_manager_get_connections (manager, NM_CONNECTION_TYPE_SYSTEM);
|
||||||
@@ -745,7 +740,7 @@ nm_device_802_11_wireless_get_address (NMDevice80211Wireless *self,
|
|||||||
memcpy (addr, &(self->priv->hw_addr), sizeof (struct ether_addr));
|
memcpy (addr, &(self->priv->hw_addr), sizeof (struct ether_addr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static gboolean
|
static gboolean
|
||||||
link_to_specific_ap (NMDevice80211Wireless *self,
|
link_to_specific_ap (NMDevice80211Wireless *self,
|
||||||
NMAccessPoint *ap,
|
NMAccessPoint *ap,
|
||||||
@@ -780,7 +775,6 @@ link_to_specific_ap (NMDevice80211Wireless *self,
|
|||||||
return have_link;
|
return have_link;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
get_ap_blacklisted (NMAccessPoint *ap, GSList *addrs)
|
get_ap_blacklisted (NMAccessPoint *ap, GSList *addrs)
|
||||||
{
|
{
|
||||||
@@ -811,7 +805,6 @@ get_ap_blacklisted (NMAccessPoint *ap, GSList *addrs)
|
|||||||
return blacklisted;
|
return blacklisted;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
/*
|
/*
|
||||||
* nm_device_update_best_ap
|
* nm_device_update_best_ap
|
||||||
*
|
*
|
||||||
@@ -904,8 +897,6 @@ static NMAccessPoint *
|
|||||||
ap_list_get_ap_by_ssid (GSList *list,
|
ap_list_get_ap_by_ssid (GSList *list,
|
||||||
const GByteArray * ssid)
|
const GByteArray * ssid)
|
||||||
{
|
{
|
||||||
NMAccessPoint * ap;
|
|
||||||
NMAccessPoint * found_ap = NULL;
|
|
||||||
GSList * elt;
|
GSList * elt;
|
||||||
|
|
||||||
for (elt = list; elt; elt = g_slist_next (elt)) {
|
for (elt = list; elt; elt = g_slist_next (elt)) {
|
||||||
@@ -919,7 +910,8 @@ ap_list_get_ap_by_ssid (GSList *list,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
#if DEBUG
|
||||||
|
static void
|
||||||
nm_device_802_11_wireless_ap_list_print (NMDevice80211Wireless *self)
|
nm_device_802_11_wireless_ap_list_print (NMDevice80211Wireless *self)
|
||||||
{
|
{
|
||||||
GSList * elt;
|
GSList * elt;
|
||||||
@@ -934,6 +926,7 @@ nm_device_802_11_wireless_ap_list_print (NMDevice80211Wireless *self)
|
|||||||
}
|
}
|
||||||
nm_info ("AP_LIST_PRINT: done");
|
nm_info ("AP_LIST_PRINT: done");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* nm_device_802_11_wireless_ap_list_get_ap_by_ssid
|
* nm_device_802_11_wireless_ap_list_get_ap_by_ssid
|
||||||
@@ -1246,7 +1239,7 @@ nm_device_802_11_wireless_get_ssid (NMDevice80211Wireless *self)
|
|||||||
{
|
{
|
||||||
NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
|
NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
|
||||||
const char * iface;
|
const char * iface;
|
||||||
int err, sk;
|
int sk;
|
||||||
struct iwreq wrq;
|
struct iwreq wrq;
|
||||||
char ssid[IW_ESSID_MAX_SIZE + 1];
|
char ssid[IW_ESSID_MAX_SIZE + 1];
|
||||||
guint32 len;
|
guint32 len;
|
||||||
@@ -1283,7 +1276,7 @@ nm_device_802_11_wireless_get_ssid (NMDevice80211Wireless *self)
|
|||||||
len--;
|
len--;
|
||||||
|
|
||||||
priv->ssid = g_byte_array_sized_new (len);
|
priv->ssid = g_byte_array_sized_new (len);
|
||||||
g_byte_array_append (priv->ssid, ssid, len);
|
g_byte_array_append (priv->ssid, (const guint8 *) ssid, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
@@ -1302,7 +1295,7 @@ nm_device_802_11_wireless_set_ssid (NMDevice80211Wireless *self,
|
|||||||
const GByteArray * ssid)
|
const GByteArray * ssid)
|
||||||
{
|
{
|
||||||
NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
|
NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
|
||||||
int sk, err;
|
int sk;
|
||||||
struct iwreq wrq;
|
struct iwreq wrq;
|
||||||
const char * iface;
|
const char * iface;
|
||||||
const char * driver;
|
const char * driver;
|
||||||
@@ -1548,6 +1541,7 @@ cancel_pending_scan (NMDevice80211Wireless *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
/*
|
/*
|
||||||
* is_associated
|
* is_associated
|
||||||
*
|
*
|
||||||
@@ -1599,6 +1593,7 @@ out:
|
|||||||
|
|
||||||
return associated;
|
return associated;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ap_auth_enforced
|
* ap_auth_enforced
|
||||||
@@ -1694,7 +1689,7 @@ merge_scanned_ap (NMDevice80211Wireless *self,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Frequency match */
|
/* Frequency match */
|
||||||
if (list_freq != merge_freq)
|
if ((int) list_freq != (int) merge_freq)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
found_ap = list_ap;
|
found_ap = list_ap;
|
||||||
@@ -1726,7 +1721,6 @@ static void
|
|||||||
cull_scan_list (NMDevice80211Wireless * self)
|
cull_scan_list (NMDevice80211Wireless * self)
|
||||||
{
|
{
|
||||||
GTimeVal cur_time;
|
GTimeVal cur_time;
|
||||||
NMAccessPoint * outdated_ap;
|
|
||||||
GSList * outdated_list = NULL;
|
GSList * outdated_list = NULL;
|
||||||
GSList * elt;
|
GSList * elt;
|
||||||
NMAccessPoint * cur_ap = NULL;
|
NMAccessPoint * cur_ap = NULL;
|
||||||
@@ -1759,7 +1753,8 @@ cull_scan_list (NMDevice80211Wireless * self)
|
|||||||
|
|
||||||
/* Remove outdated APs */
|
/* Remove outdated APs */
|
||||||
for (elt = outdated_list; elt; elt = g_slist_next (elt)) {
|
for (elt = outdated_list; elt; elt = g_slist_next (elt)) {
|
||||||
outdated_ap = NM_AP (elt->data);
|
NMAccessPoint * outdated_ap = NM_AP (elt->data);
|
||||||
|
|
||||||
network_removed (self, outdated_ap);
|
network_removed (self, outdated_ap);
|
||||||
self->priv->ap_list = g_slist_remove (self->priv->ap_list, outdated_ap);
|
self->priv->ap_list = g_slist_remove (self->priv->ap_list, outdated_ap);
|
||||||
g_object_unref (outdated_ap);
|
g_object_unref (outdated_ap);
|
||||||
@@ -1890,7 +1885,6 @@ link_timeout_cb (gpointer user_data)
|
|||||||
NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (user_data);
|
NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (user_data);
|
||||||
NMActRequest * req = NULL;
|
NMActRequest * req = NULL;
|
||||||
NMAccessPoint * ap = NULL;
|
NMAccessPoint * ap = NULL;
|
||||||
gboolean has_key;
|
|
||||||
|
|
||||||
g_assert (dev);
|
g_assert (dev);
|
||||||
|
|
||||||
@@ -2279,7 +2273,6 @@ supplicant_connection_timeout_cb (gpointer user_data)
|
|||||||
NMDevice * dev = NM_DEVICE (user_data);
|
NMDevice * dev = NM_DEVICE (user_data);
|
||||||
NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (user_data);
|
NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (user_data);
|
||||||
NMAccessPoint * ap = nm_device_802_11_wireless_get_activation_ap (self);
|
NMAccessPoint * ap = nm_device_802_11_wireless_get_activation_ap (self);
|
||||||
gboolean has_key;
|
|
||||||
|
|
||||||
cleanup_association_attempt (self, TRUE);
|
cleanup_association_attempt (self, TRUE);
|
||||||
|
|
||||||
@@ -2372,7 +2365,7 @@ build_supplicant_config (NMDevice80211Wireless *self)
|
|||||||
nm_warning ("can't add null ssid to config.");
|
nm_warning ("can't add null ssid to config.");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
nm_supplicant_config_add_option (config, "ssid", ssid->data, ssid->len);
|
nm_supplicant_config_add_option (config, "ssid", (const char *) ssid->data, ssid->len);
|
||||||
|
|
||||||
/* For non-broadcast networks, we need to set "scan_ssid 1" to scan with probe request frames.
|
/* For non-broadcast networks, we need to set "scan_ssid 1" to scan with probe request frames.
|
||||||
* However, don't try to probe Ad-Hoc networks.
|
* However, don't try to probe Ad-Hoc networks.
|
||||||
@@ -2451,7 +2444,6 @@ real_act_stage2_config (NMDevice *dev)
|
|||||||
NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
|
NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
|
||||||
NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
|
NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
|
||||||
const char * iface = nm_device_get_iface (dev);
|
const char * iface = nm_device_get_iface (dev);
|
||||||
gboolean ask_user = FALSE;
|
|
||||||
NMSupplicantConfig * config = NULL;
|
NMSupplicantConfig * config = NULL;
|
||||||
gulong id = 0;
|
gulong id = 0;
|
||||||
NMActRequest * req;
|
NMActRequest * req;
|
||||||
@@ -2596,7 +2588,6 @@ real_act_stage4_ip_config_timeout (NMDevice *dev,
|
|||||||
NMAccessPoint * ap = nm_device_802_11_wireless_get_activation_ap (self);
|
NMAccessPoint * ap = nm_device_802_11_wireless_get_activation_ap (self);
|
||||||
NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
|
NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE;
|
||||||
NMIP4Config * real_config = NULL;
|
NMIP4Config * real_config = NULL;
|
||||||
gboolean has_key;
|
|
||||||
|
|
||||||
g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE);
|
g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE);
|
||||||
g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE);
|
g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE);
|
||||||
@@ -2732,7 +2723,6 @@ nm_device_802_11_wireless_dispose (GObject *object)
|
|||||||
{
|
{
|
||||||
NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (object);
|
NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (object);
|
||||||
NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
|
NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
|
||||||
GSList * elt;
|
|
||||||
|
|
||||||
/* Make sure dispose does not run twice. */
|
/* Make sure dispose does not run twice. */
|
||||||
if (priv->dispose_has_run)
|
if (priv->dispose_has_run)
|
||||||
@@ -2885,9 +2875,6 @@ nm_device_802_11_wireless_class_init (NMDevice80211WirelessClass *klass)
|
|||||||
static void
|
static void
|
||||||
state_changed_cb (NMDevice *device, NMDeviceState state, gpointer user_data)
|
state_changed_cb (NMDevice *device, NMDeviceState state, gpointer user_data)
|
||||||
{
|
{
|
||||||
NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (device);
|
|
||||||
NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
|
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case NM_DEVICE_STATE_ACTIVATED:
|
case NM_DEVICE_STATE_ACTIVATED:
|
||||||
activation_success_handler (device);
|
activation_success_handler (device);
|
||||||
@@ -2905,7 +2892,7 @@ state_changed_cb (NMDevice *device, NMDeviceState state, gpointer user_data)
|
|||||||
|
|
||||||
|
|
||||||
NMDevice80211Wireless *
|
NMDevice80211Wireless *
|
||||||
nm_device_802_11_wireless_new (int index,
|
nm_device_802_11_wireless_new (int idx,
|
||||||
const char *udi,
|
const char *udi,
|
||||||
const char *driver,
|
const char *driver,
|
||||||
gboolean test_dev)
|
gboolean test_dev)
|
||||||
|
@@ -73,25 +73,25 @@ static void supplicant_iface_state_cb (NMSupplicantInterface * iface,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
nm_device_802_3_ethernet_link_activated (NMNetlinkMonitor *monitor,
|
nm_device_802_3_ethernet_link_activated (NMNetlinkMonitor *monitor,
|
||||||
int index,
|
int idx,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
NMDevice *dev = NM_DEVICE (user_data);
|
NMDevice *dev = NM_DEVICE (user_data);
|
||||||
|
|
||||||
/* Make sure signal is for us */
|
/* Make sure signal is for us */
|
||||||
if (nm_device_get_index (dev) == index)
|
if (nm_device_get_index (dev) == idx)
|
||||||
nm_device_set_active_link (dev, TRUE);
|
nm_device_set_active_link (dev, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nm_device_802_3_ethernet_link_deactivated (NMNetlinkMonitor *monitor,
|
nm_device_802_3_ethernet_link_deactivated (NMNetlinkMonitor *monitor,
|
||||||
int index,
|
int idx,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
NMDevice *dev = NM_DEVICE (user_data);
|
NMDevice *dev = NM_DEVICE (user_data);
|
||||||
|
|
||||||
/* Make sure signal is for us */
|
/* Make sure signal is for us */
|
||||||
if (nm_device_get_index (dev) == index)
|
if (nm_device_get_index (dev) == idx)
|
||||||
nm_device_set_active_link (dev, FALSE);
|
nm_device_set_active_link (dev, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,20 +242,20 @@ real_bring_down (NMDevice *dev)
|
|||||||
|
|
||||||
|
|
||||||
NMDevice8023Ethernet *
|
NMDevice8023Ethernet *
|
||||||
nm_device_802_3_ethernet_new (int index,
|
nm_device_802_3_ethernet_new (int idx,
|
||||||
const char *udi,
|
const char *udi,
|
||||||
const char *driver,
|
const char *driver,
|
||||||
gboolean test_dev)
|
gboolean test_dev)
|
||||||
{
|
{
|
||||||
GObject *obj;
|
GObject *obj;
|
||||||
|
|
||||||
g_return_val_if_fail (index >= 0, NULL);
|
g_return_val_if_fail (idx >= 0, NULL);
|
||||||
g_return_val_if_fail (udi != NULL, NULL);
|
g_return_val_if_fail (udi != NULL, NULL);
|
||||||
g_return_val_if_fail (driver != NULL, NULL);
|
g_return_val_if_fail (driver != NULL, NULL);
|
||||||
|
|
||||||
obj = g_object_new (NM_TYPE_DEVICE_802_3_ETHERNET,
|
obj = g_object_new (NM_TYPE_DEVICE_802_3_ETHERNET,
|
||||||
NM_DEVICE_INTERFACE_UDI, udi,
|
NM_DEVICE_INTERFACE_UDI, udi,
|
||||||
NM_DEVICE_INTERFACE_INDEX, index,
|
NM_DEVICE_INTERFACE_INDEX, idx,
|
||||||
NM_DEVICE_INTERFACE_DRIVER, driver,
|
NM_DEVICE_INTERFACE_DRIVER, driver,
|
||||||
NULL);
|
NULL);
|
||||||
if (obj == NULL)
|
if (obj == NULL)
|
||||||
|
@@ -104,7 +104,7 @@ is_wired_device (NMHalManager *manager, const char *udi)
|
|||||||
return is_wired;
|
return is_wired;
|
||||||
}
|
}
|
||||||
|
|
||||||
NMDevice *
|
static NMDevice *
|
||||||
wired_device_creator (NMHalManager *manager, const char *udi)
|
wired_device_creator (NMHalManager *manager, const char *udi)
|
||||||
{
|
{
|
||||||
NMDevice *device;
|
NMDevice *device;
|
||||||
@@ -145,7 +145,7 @@ is_wireless_device (NMHalManager *manager, const char *udi)
|
|||||||
return is_wireless;
|
return is_wireless;
|
||||||
}
|
}
|
||||||
|
|
||||||
NMDevice *
|
static NMDevice *
|
||||||
wireless_device_creator (NMHalManager *manager, const char *udi)
|
wireless_device_creator (NMHalManager *manager, const char *udi)
|
||||||
{
|
{
|
||||||
NMDevice *device;
|
NMDevice *device;
|
||||||
|
@@ -345,7 +345,6 @@ new_connection_cb (DBusGProxy *proxy, const char *path, gpointer user_data)
|
|||||||
DBusGProxy *con_proxy;
|
DBusGProxy *con_proxy;
|
||||||
NMDBusManager * dbus_mgr;
|
NMDBusManager * dbus_mgr;
|
||||||
DBusGConnection * g_connection;
|
DBusGConnection * g_connection;
|
||||||
NMConnection *connection;
|
|
||||||
DBusGProxyCall *call;
|
DBusGProxyCall *call;
|
||||||
struct GetSettingsInfo *info;
|
struct GetSettingsInfo *info;
|
||||||
|
|
||||||
@@ -501,7 +500,7 @@ nm_manager_name_owner_changed (NMDBusManager *mgr,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
initial_get_connections (gpointer user_data)
|
initial_get_connections (gpointer user_data)
|
||||||
{
|
{
|
||||||
NMManager * manager = NM_MANAGER (user_data);
|
NMManager * manager = NM_MANAGER (user_data);
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
* Make a DBus error message
|
* Make a DBus error message
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
DBusMessage *
|
static DBusMessage *
|
||||||
nm_dbus_create_error_message (DBusMessage *message,
|
nm_dbus_create_error_message (DBusMessage *message,
|
||||||
const char *exception_namespace,
|
const char *exception_namespace,
|
||||||
const char *exception,
|
const char *exception,
|
||||||
@@ -63,7 +63,7 @@ nm_dbus_create_error_message (DBusMessage *message,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DBusMessage *
|
static DBusMessage *
|
||||||
nm_dbus_new_invalid_args_error (DBusMessage *replyto,
|
nm_dbus_new_invalid_args_error (DBusMessage *replyto,
|
||||||
const char *namespace)
|
const char *namespace)
|
||||||
{
|
{
|
||||||
@@ -91,7 +91,7 @@ static guint32 pcall_gid = 0;
|
|||||||
static guint32 pcall_pending = 0;
|
static guint32 pcall_pending = 0;
|
||||||
|
|
||||||
|
|
||||||
DBusPendingCall *
|
static DBusPendingCall *
|
||||||
nm_dbus_send_with_callback (DBusConnection *connection,
|
nm_dbus_send_with_callback (DBusConnection *connection,
|
||||||
DBusMessage *msg,
|
DBusMessage *msg,
|
||||||
DBusPendingCallNotifyFunction func,
|
DBusPendingCallNotifyFunction func,
|
||||||
@@ -150,7 +150,7 @@ nm_dbus_send_with_callback (DBusConnection *connection,
|
|||||||
return pcall;
|
return pcall;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
nm_dbus_send_with_callback_replied (DBusPendingCall *pcall,
|
nm_dbus_send_with_callback_replied (DBusPendingCall *pcall,
|
||||||
const char *caller)
|
const char *caller)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user