2005-10-03 Robert Love <rml@novell.com>
* src/backends/NetworkManagerSuSE.c: Fix Glib error, GError must be NULL. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@986 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2005-10-03 Robert Love <rml@novell.com>
|
||||||
|
|
||||||
|
* src/backends/NetworkManagerSuSE.c: Fix Glib error, GError must be
|
||||||
|
NULL.
|
||||||
|
|
||||||
2005-10-02 Dan Williams <dcbw@redhat.com>
|
2005-10-02 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* Shorten time taken to sleep by fastpathing bits of device deactivation
|
* Shorten time taken to sleep by fastpathing bits of device deactivation
|
||||||
|
@@ -662,6 +662,7 @@ static void nmwa_dbus_device_properties_cb (DBusPendingCall *pcall, void *user_d
|
|||||||
const char * broadcast = NULL;
|
const char * broadcast = NULL;
|
||||||
const char * subnetmask = NULL;
|
const char * subnetmask = NULL;
|
||||||
const char * hw_addr = NULL;
|
const char * hw_addr = NULL;
|
||||||
|
const char * route = NULL;
|
||||||
dbus_uint32_t mode = 0;
|
dbus_uint32_t mode = 0;
|
||||||
dbus_int32_t strength = -1;
|
dbus_int32_t strength = -1;
|
||||||
char * active_network_path = NULL;
|
char * active_network_path = NULL;
|
||||||
@@ -693,6 +694,7 @@ static void nmwa_dbus_device_properties_cb (DBusPendingCall *pcall, void *user_d
|
|||||||
DBUS_TYPE_STRING, &subnetmask,
|
DBUS_TYPE_STRING, &subnetmask,
|
||||||
DBUS_TYPE_STRING, &broadcast,
|
DBUS_TYPE_STRING, &broadcast,
|
||||||
DBUS_TYPE_STRING, &hw_addr,
|
DBUS_TYPE_STRING, &hw_addr,
|
||||||
|
DBUS_TYPE_STRING, &route,
|
||||||
DBUS_TYPE_UINT32, &mode,
|
DBUS_TYPE_UINT32, &mode,
|
||||||
DBUS_TYPE_INT32, &strength,
|
DBUS_TYPE_INT32, &strength,
|
||||||
DBUS_TYPE_BOOLEAN,&link_active,
|
DBUS_TYPE_BOOLEAN,&link_active,
|
||||||
@@ -713,6 +715,7 @@ static void nmwa_dbus_device_properties_cb (DBusPendingCall *pcall, void *user_d
|
|||||||
network_device_set_ip4_address (dev, ip4_address);
|
network_device_set_ip4_address (dev, ip4_address);
|
||||||
network_device_set_broadcast (dev, broadcast);
|
network_device_set_broadcast (dev, broadcast);
|
||||||
network_device_set_netmask (dev, subnetmask);
|
network_device_set_netmask (dev, subnetmask);
|
||||||
|
network_device_set_route (dev, route);
|
||||||
|
|
||||||
/* If the device already exists in our list for some reason, remove it so we
|
/* If the device already exists in our list for some reason, remove it so we
|
||||||
* can add the new one with updated data.
|
* can add the new one with updated data.
|
||||||
|
@@ -189,7 +189,7 @@ static gboolean nmwa_update_info (NMWirelessApplet *applet)
|
|||||||
{
|
{
|
||||||
GtkWidget *info_dialog;
|
GtkWidget *info_dialog;
|
||||||
char *addr = NULL, *mask = NULL, *broadcast = NULL;
|
char *addr = NULL, *mask = NULL, *broadcast = NULL;
|
||||||
char *mac = NULL, *iface_and_type = NULL;
|
char *mac = NULL, *iface_and_type = NULL, *route = NULL;
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
const char *iface = NULL;
|
const char *iface = NULL;
|
||||||
NetworkDevice *dev;
|
NetworkDevice *dev;
|
||||||
@@ -218,6 +218,7 @@ static gboolean nmwa_update_info (NMWirelessApplet *applet)
|
|||||||
broadcast = (char*) network_device_get_broadcast (dev);
|
broadcast = (char*) network_device_get_broadcast (dev);
|
||||||
addr = (char*) network_device_get_ip4_address (dev);
|
addr = (char*) network_device_get_ip4_address (dev);
|
||||||
mask = (char*) network_device_get_netmask (dev);
|
mask = (char*) network_device_get_netmask (dev);
|
||||||
|
route = (char*) network_device_get_route (dev);
|
||||||
|
|
||||||
if (network_device_is_wired (dev))
|
if (network_device_is_wired (dev))
|
||||||
iface_and_type = g_strdup_printf (_("Wired Ethernet (%s)"), iface);
|
iface_and_type = g_strdup_printf (_("Wired Ethernet (%s)"), iface);
|
||||||
@@ -239,6 +240,9 @@ static gboolean nmwa_update_info (NMWirelessApplet *applet)
|
|||||||
label = get_label (info_dialog, applet->info_dialog_xml, "label-hardware-address");
|
label = get_label (info_dialog, applet->info_dialog_xml, "label-hardware-address");
|
||||||
gtk_label_set_text (GTK_LABEL (label), mac);
|
gtk_label_set_text (GTK_LABEL (label), mac);
|
||||||
|
|
||||||
|
label = get_label (info_dialog, applet->info_dialog_xml, "label-default-route");
|
||||||
|
gtk_label_set_text (GTK_LABEL (label), route);
|
||||||
|
|
||||||
g_free (iface_and_type);
|
g_free (iface_and_type);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -45,6 +45,7 @@ struct NetworkDevice
|
|||||||
char * broadcast;
|
char * broadcast;
|
||||||
char * netmask;
|
char * netmask;
|
||||||
char * udi;
|
char * udi;
|
||||||
|
char * route;
|
||||||
gint strength;
|
gint strength;
|
||||||
GSList * networks;
|
GSList * networks;
|
||||||
NMActStage act_stage;
|
NMActStage act_stage;
|
||||||
@@ -98,6 +99,7 @@ NetworkDevice *network_device_copy (NetworkDevice *src)
|
|||||||
dev->driver_support_level = src->driver_support_level;
|
dev->driver_support_level = src->driver_support_level;
|
||||||
dev->iface = g_strdup (src->iface);
|
dev->iface = g_strdup (src->iface);
|
||||||
dev->desc = g_strdup (src->desc);
|
dev->desc = g_strdup (src->desc);
|
||||||
|
dev->route = g_strdup (src->route);
|
||||||
dev->udi = g_strdup (src->udi);
|
dev->udi = g_strdup (src->udi);
|
||||||
dev->active = src->active;
|
dev->active = src->active;
|
||||||
dev->act_stage = src->act_stage;
|
dev->act_stage = src->act_stage;
|
||||||
@@ -148,6 +150,7 @@ void network_device_unref (NetworkDevice *dev)
|
|||||||
network_device_clear_wireless_networks (dev);
|
network_device_clear_wireless_networks (dev);
|
||||||
g_free (dev->nm_path);
|
g_free (dev->nm_path);
|
||||||
g_free (dev->iface);
|
g_free (dev->iface);
|
||||||
|
g_free (dev->route);
|
||||||
g_free (dev->udi);
|
g_free (dev->udi);
|
||||||
g_free (dev->desc);
|
g_free (dev->desc);
|
||||||
g_free (dev->addr);
|
g_free (dev->addr);
|
||||||
@@ -470,6 +473,25 @@ void network_device_set_ip4_address (NetworkDevice *dev, const char *addr)
|
|||||||
dev->ip4addr = addr ? g_strdup (addr) : NULL;
|
dev->ip4addr = addr ? g_strdup (addr) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accessors for default route
|
||||||
|
*/
|
||||||
|
const char *network_device_get_route (NetworkDevice *dev)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (dev != NULL, NULL);
|
||||||
|
|
||||||
|
return (dev->route);
|
||||||
|
}
|
||||||
|
|
||||||
|
void network_device_set_route (NetworkDevice *dev, const char *route)
|
||||||
|
{
|
||||||
|
g_return_if_fail (dev != NULL);
|
||||||
|
|
||||||
|
if (dev->route)
|
||||||
|
g_free (dev->route);
|
||||||
|
dev->route = route ? g_strdup (route) : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Accessors for driver support level
|
* Accessors for driver support level
|
||||||
*/
|
*/
|
||||||
|
@@ -66,8 +66,11 @@ void network_device_set_broadcast (NetworkDevice *dev, const char *addr);
|
|||||||
const char * network_device_get_netmask (NetworkDevice *dev);
|
const char * network_device_get_netmask (NetworkDevice *dev);
|
||||||
void network_device_set_netmask (NetworkDevice *dev, const char *addr);
|
void network_device_set_netmask (NetworkDevice *dev, const char *addr);
|
||||||
|
|
||||||
const char * network_device_get_ip4_address (NetworkDevice *dev);
|
const char * network_device_get_ip4_address (NetworkDevice *dev);
|
||||||
void network_device_set_ip4_address (NetworkDevice *dev, const char *addr);
|
void network_device_set_ip4_address (NetworkDevice *dev, const char *addr);
|
||||||
|
|
||||||
|
const char * network_device_get_route (NetworkDevice *dev);
|
||||||
|
void network_device_set_route (NetworkDevice *dev, const char *route);
|
||||||
|
|
||||||
NMDriverSupportLevel network_device_get_driver_support_level (NetworkDevice *dev);
|
NMDriverSupportLevel network_device_get_driver_support_level (NetworkDevice *dev);
|
||||||
void network_device_set_driver_support_level (NetworkDevice *dev, NMDriverSupportLevel level);
|
void network_device_set_driver_support_level (NetworkDevice *dev, NMDriverSupportLevel level);
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||||
<property name="focus_on_map">True</property>
|
<property name="focus_on_map">True</property>
|
||||||
|
<property name="urgency_hint">False</property>
|
||||||
<property name="has_separator">False</property>
|
<property name="has_separator">False</property>
|
||||||
|
|
||||||
<child internal-child="vbox">
|
<child internal-child="vbox">
|
||||||
@@ -172,6 +173,7 @@ You have chosen to log in to the wireless network '%s'. If you are sure that th
|
|||||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||||
<property name="focus_on_map">True</property>
|
<property name="focus_on_map">True</property>
|
||||||
|
<property name="urgency_hint">False</property>
|
||||||
<property name="has_separator">False</property>
|
<property name="has_separator">False</property>
|
||||||
|
|
||||||
<child internal-child="vbox">
|
<child internal-child="vbox">
|
||||||
@@ -316,6 +318,7 @@ You have chosen to log in to the wireless network '%s'. If you are sure that th
|
|||||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||||
<property name="focus_on_map">True</property>
|
<property name="focus_on_map">True</property>
|
||||||
|
<property name="urgency_hint">False</property>
|
||||||
<property name="has_separator">False</property>
|
<property name="has_separator">False</property>
|
||||||
|
|
||||||
<child internal-child="vbox">
|
<child internal-child="vbox">
|
||||||
@@ -618,6 +621,7 @@ You have chosen to log in to the wireless network '%s'. If you are sure that th
|
|||||||
<property name="yalign">0.5</property>
|
<property name="yalign">0.5</property>
|
||||||
<property name="xpad">0</property>
|
<property name="xpad">0</property>
|
||||||
<property name="ypad">0</property>
|
<property name="ypad">0</property>
|
||||||
|
<property name="mnemonic_widget">passphrase_entry</property>
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
<property name="width_chars">-1</property>
|
<property name="width_chars">-1</property>
|
||||||
<property name="single_line_mode">False</property>
|
<property name="single_line_mode">False</property>
|
||||||
@@ -721,6 +725,7 @@ Hex key (WEP)</property>
|
|||||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||||
<property name="focus_on_map">True</property>
|
<property name="focus_on_map">True</property>
|
||||||
|
<property name="urgency_hint">False</property>
|
||||||
<property name="has_separator">False</property>
|
<property name="has_separator">False</property>
|
||||||
|
|
||||||
<child internal-child="vbox">
|
<child internal-child="vbox">
|
||||||
@@ -974,6 +979,7 @@ Hex Key (WEP)</property>
|
|||||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||||
<property name="focus_on_map">True</property>
|
<property name="focus_on_map">True</property>
|
||||||
|
<property name="urgency_hint">False</property>
|
||||||
<property name="has_separator">False</property>
|
<property name="has_separator">False</property>
|
||||||
|
|
||||||
<child internal-child="vbox">
|
<child internal-child="vbox">
|
||||||
@@ -1055,7 +1061,7 @@ Hex Key (WEP)</property>
|
|||||||
<widget class="GtkTable" id="table1">
|
<widget class="GtkTable" id="table1">
|
||||||
<property name="border_width">1</property>
|
<property name="border_width">1</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="n_rows">9</property>
|
<property name="n_rows">10</property>
|
||||||
<property name="n_columns">2</property>
|
<property name="n_columns">2</property>
|
||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="row_spacing">3</property>
|
<property name="row_spacing">3</property>
|
||||||
@@ -1539,6 +1545,63 @@ Hex Key (WEP)</property>
|
|||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label20">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Default Route:</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="right_attach">1</property>
|
||||||
|
<property name="top_attach">9</property>
|
||||||
|
<property name="bottom_attach">10</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label-default-route">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes"></property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">9</property>
|
||||||
|
<property name="bottom_attach">10</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
|
@@ -765,7 +765,7 @@ GSList * nm_system_get_dialup_config (void)
|
|||||||
{
|
{
|
||||||
GSList *list = NULL;
|
GSList *list = NULL;
|
||||||
const char *dentry;
|
const char *dentry;
|
||||||
GError *err;
|
GError *err = NULL;
|
||||||
GDir *dir;
|
GDir *dir;
|
||||||
|
|
||||||
dir = g_dir_open (SYSCONFDIR "/sysconfig/network", 0, &err);
|
dir = g_dir_open (SYSCONFDIR "/sysconfig/network", 0, &err);
|
||||||
|
@@ -329,6 +329,7 @@ static DBusMessage *nm_dbus_device_get_properties (DBusConnection *connection, D
|
|||||||
gchar * ip4_address;
|
gchar * ip4_address;
|
||||||
gchar * broadcast;
|
gchar * broadcast;
|
||||||
gchar * subnetmask;
|
gchar * subnetmask;
|
||||||
|
gchar * route;
|
||||||
struct ether_addr hw_addr;
|
struct ether_addr hw_addr;
|
||||||
char hw_addr_buf[20];
|
char hw_addr_buf[20];
|
||||||
char * hw_addr_buf_ptr = &hw_addr_buf[0];
|
char * hw_addr_buf_ptr = &hw_addr_buf[0];
|
||||||
@@ -358,6 +359,7 @@ static DBusMessage *nm_dbus_device_get_properties (DBusConnection *connection, D
|
|||||||
ip4_address = nm_utils_inet_ip4_address_as_string (nm_device_get_ip4_address (dev));
|
ip4_address = nm_utils_inet_ip4_address_as_string (nm_device_get_ip4_address (dev));
|
||||||
broadcast = nm_utils_inet_ip4_address_as_string (broadcast_addr);
|
broadcast = nm_utils_inet_ip4_address_as_string (broadcast_addr);
|
||||||
subnetmask = nm_utils_inet_ip4_address_as_string (subnetmask_addr);
|
subnetmask = nm_utils_inet_ip4_address_as_string (subnetmask_addr);
|
||||||
|
route = g_strdup ("123.456.789.101");
|
||||||
|
|
||||||
if (nm_device_is_wireless (dev))
|
if (nm_device_is_wireless (dev))
|
||||||
{
|
{
|
||||||
@@ -369,13 +371,13 @@ static DBusMessage *nm_dbus_device_get_properties (DBusConnection *connection, D
|
|||||||
strength = (dbus_int32_t) nm_device_get_signal_strength (dev);
|
strength = (dbus_int32_t) nm_device_get_signal_strength (dev);
|
||||||
mode = (dbus_uint32_t) nm_device_get_mode (dev);
|
mode = (dbus_uint32_t) nm_device_get_mode (dev);
|
||||||
|
|
||||||
if (req && (ap = nm_act_request_get_ap (req)))
|
if (req && (ap = nm_act_request_get_ap (req)))
|
||||||
{
|
{
|
||||||
NMAccessPoint *tmp_ap;
|
NMAccessPoint *tmp_ap;
|
||||||
|
|
||||||
if ((tmp_ap = nm_device_ap_list_get_ap_by_essid (dev, nm_ap_get_essid (ap))))
|
if ((tmp_ap = nm_device_ap_list_get_ap_by_essid (dev, nm_ap_get_essid (ap))))
|
||||||
active_network_path = nm_dbus_get_object_path_for_network (dev, tmp_ap);
|
active_network_path = nm_dbus_get_object_path_for_network (dev, tmp_ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
ap_list = nm_device_ap_list_get (dev);
|
ap_list = nm_device_ap_list_get (dev);
|
||||||
if (ap_list && (num_networks = nm_ap_list_size (ap_list)))
|
if (ap_list && (num_networks = nm_ap_list_size (ap_list)))
|
||||||
@@ -411,6 +413,7 @@ static DBusMessage *nm_dbus_device_get_properties (DBusConnection *connection, D
|
|||||||
DBUS_TYPE_STRING, &subnetmask,
|
DBUS_TYPE_STRING, &subnetmask,
|
||||||
DBUS_TYPE_STRING, &broadcast,
|
DBUS_TYPE_STRING, &broadcast,
|
||||||
DBUS_TYPE_STRING, &hw_addr_buf_ptr,
|
DBUS_TYPE_STRING, &hw_addr_buf_ptr,
|
||||||
|
DBUS_TYPE_STRING, &route,
|
||||||
DBUS_TYPE_UINT32, &mode,
|
DBUS_TYPE_UINT32, &mode,
|
||||||
DBUS_TYPE_INT32, &strength,
|
DBUS_TYPE_INT32, &strength,
|
||||||
DBUS_TYPE_BOOLEAN,&link_active,
|
DBUS_TYPE_BOOLEAN,&link_active,
|
||||||
@@ -421,6 +424,7 @@ static DBusMessage *nm_dbus_device_get_properties (DBusConnection *connection, D
|
|||||||
g_free (op);
|
g_free (op);
|
||||||
g_free (active_network_path);
|
g_free (active_network_path);
|
||||||
g_strfreev (networks);
|
g_strfreev (networks);
|
||||||
|
g_free (route);
|
||||||
g_free (ip4_address);
|
g_free (ip4_address);
|
||||||
g_free (broadcast);
|
g_free (broadcast);
|
||||||
g_free (subnetmask);
|
g_free (subnetmask);
|
||||||
|
Reference in New Issue
Block a user