2006-01-16 Robert Love <rml@novell.com>
* gnome/applet/eggtrayicon.c, src/nm-device.c, src/nm-ap-security.c, gnome/applet/nm-gconf-wso-wep.c, gnome/applet/nm-gconf-wso-wpa-psk.c, gnome/applet/nm-gconf-wso.c, src/nm-device-802-3-ethernet.c, gnome/vpn-properties/nm-vpn-properties.c, src/nm-ap-security-wep.c, src/nm-ap-security-wpa-psk.c, src/nm-device-802-11-wireless.c, src/nm-netlink-monitor.c: Don't miss any initializers on structure declarations, ever. * gnome/applet/applet.c: Remove useless check (NMState is unsigned and NM_STATE_DISCONNECTED is zero). git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1351 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
12
ChangeLog
12
ChangeLog
@@ -1,3 +1,15 @@
|
||||
2006-01-16 Robert Love <rml@novell.com>
|
||||
|
||||
* gnome/applet/eggtrayicon.c, src/nm-device.c, src/nm-ap-security.c,
|
||||
gnome/applet/nm-gconf-wso-wep.c, gnome/applet/nm-gconf-wso-wpa-psk.c,
|
||||
gnome/applet/nm-gconf-wso.c, src/nm-device-802-3-ethernet.c,
|
||||
gnome/vpn-properties/nm-vpn-properties.c, src/nm-ap-security-wep.c,
|
||||
src/nm-ap-security-wpa-psk.c, src/nm-device-802-11-wireless.c,
|
||||
src/nm-netlink-monitor.c: Don't miss any initializers on structure
|
||||
declarations, ever.
|
||||
* gnome/applet/applet.c: Remove useless check (NMState is unsigned and
|
||||
NM_STATE_DISCONNECTED is zero).
|
||||
|
||||
2006-01-16 Robert Love <rml@novell.com>
|
||||
|
||||
* src/nm-device-802-11-wireless.c: argv[3], not argv[4]. Fix
|
||||
|
@@ -2158,7 +2158,7 @@ static inline void nmwa_enable_networking_set_active (NMWirelessApplet *applet)
|
||||
void nmwa_set_state (NMWirelessApplet *applet, enum NMState state)
|
||||
{
|
||||
g_return_if_fail (applet != NULL);
|
||||
g_return_if_fail (state >= NM_STATE_UNKNOWN && state <= NM_STATE_DISCONNECTED);
|
||||
g_return_if_fail (state <= NM_STATE_DISCONNECTED);
|
||||
applet->nm_state = state;
|
||||
nmwa_enable_networking_set_active (applet);
|
||||
}
|
||||
|
@@ -90,7 +90,8 @@ egg_tray_icon_get_type (void)
|
||||
NULL, /* class_data */
|
||||
sizeof (EggTrayIcon),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) egg_tray_icon_init
|
||||
(GInstanceInitFunc) egg_tray_icon_init,
|
||||
NULL /* value_table */
|
||||
};
|
||||
|
||||
our_type = g_type_register_static (GTK_TYPE_PLUG, "EggTrayIcon", &our_info, 0);
|
||||
|
@@ -154,7 +154,8 @@ nm_gconf_wso_wep_get_type (void)
|
||||
NULL, /* class_data */
|
||||
sizeof (NMGConfWSOWEP),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) nm_gconf_wso_wep_init
|
||||
(GInstanceInitFunc) nm_gconf_wso_wep_init,
|
||||
NULL /* value_table */
|
||||
};
|
||||
type = g_type_register_static (NM_TYPE_GCONF_WSO,
|
||||
"NMGConfWSOWEP",
|
||||
|
@@ -171,7 +171,8 @@ nm_gconf_wso_wpa_psk_get_type (void)
|
||||
NULL, /* class_data */
|
||||
sizeof (NMGConfWSOWPA_PSK),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) nm_gconf_wso_wpa_psk_init
|
||||
(GInstanceInitFunc) nm_gconf_wso_wpa_psk_init,
|
||||
NULL /* value_table */
|
||||
};
|
||||
type = g_type_register_static (NM_TYPE_GCONF_WSO,
|
||||
"NMGConfWSOWPA_PSK",
|
||||
|
@@ -355,7 +355,8 @@ nm_gconf_wso_get_type (void)
|
||||
NULL, /* class_data */
|
||||
sizeof (NMGConfWSO),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) nm_gconf_wso_init
|
||||
(GInstanceInitFunc) nm_gconf_wso_init,
|
||||
NULL /* value_table */
|
||||
};
|
||||
type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"NMGConfWSO",
|
||||
|
@@ -1073,7 +1073,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
{ "import-service", 's', 0, G_OPTION_ARG_STRING, &import_svc, "VPN Service for importing", NULL},
|
||||
{ "import-file", 'f', 0, G_OPTION_ARG_STRING, &import_file, "File to import", NULL},
|
||||
{ NULL }
|
||||
{ NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
bindtextdomain (GETTEXT_PACKAGE, NULL);
|
||||
|
@@ -198,7 +198,8 @@ nm_ap_security_wep_get_type (void)
|
||||
NULL, /* class_data */
|
||||
sizeof (NMAPSecurityWEP),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) nm_ap_security_wep_init
|
||||
(GInstanceInitFunc) nm_ap_security_wep_init,
|
||||
NULL /* value_table */
|
||||
};
|
||||
type = g_type_register_static (NM_TYPE_AP_SECURITY,
|
||||
"NMAPSecurityWEP",
|
||||
|
@@ -251,7 +251,8 @@ nm_ap_security_wpa_psk_get_type (void)
|
||||
NULL, /* class_data */
|
||||
sizeof (NMAPSecurityWPA_PSK),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) nm_ap_security_wpa_psk_init
|
||||
(GInstanceInitFunc) nm_ap_security_wpa_psk_init,
|
||||
NULL /* value_table */
|
||||
};
|
||||
type = g_type_register_static (NM_TYPE_AP_SECURITY,
|
||||
"NMAPSecurityWPA_PSK",
|
||||
|
@@ -384,8 +384,10 @@ nm_ap_security_get_type (void)
|
||||
NULL, /* class_data */
|
||||
sizeof (NMAPSecurity),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) nm_ap_security_init
|
||||
(GInstanceInitFunc) nm_ap_security_init,
|
||||
NULL /* value_table */
|
||||
};
|
||||
|
||||
type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"NMAPSecurity",
|
||||
&info, 0);
|
||||
|
@@ -2912,7 +2912,8 @@ nm_device_802_11_wireless_get_type (void)
|
||||
NULL, /* class_data */
|
||||
sizeof (NMDevice80211Wireless),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) nm_device_802_11_wireless_init
|
||||
(GInstanceInitFunc) nm_device_802_11_wireless_init,
|
||||
NULL /* value_table */
|
||||
};
|
||||
type = g_type_register_static (NM_TYPE_DEVICE,
|
||||
"NMDevice80211Wireless",
|
||||
|
@@ -300,7 +300,8 @@ nm_device_802_3_ethernet_get_type (void)
|
||||
NULL, /* class_data */
|
||||
sizeof (NMDevice8023Ethernet),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) nm_device_802_3_ethernet_init
|
||||
(GInstanceInitFunc) nm_device_802_3_ethernet_init,
|
||||
NULL /* value_table */
|
||||
};
|
||||
type = g_type_register_static (NM_TYPE_DEVICE,
|
||||
"NMDevice8023Ethernet",
|
||||
|
@@ -1984,7 +1984,8 @@ nm_device_get_type (void)
|
||||
NULL, /* class_data */
|
||||
sizeof (NMDevice),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) nm_device_init
|
||||
(GInstanceInitFunc) nm_device_init,
|
||||
NULL /* value_table */
|
||||
};
|
||||
type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"NMDevice",
|
||||
|
@@ -136,7 +136,7 @@ gboolean
|
||||
nm_netlink_monitor_open_connection (NmNetlinkMonitor *monitor,
|
||||
GError **error)
|
||||
{
|
||||
struct sockaddr_nl monitor_address = { 0 };
|
||||
struct sockaddr_nl monitor_address = { .nl_family = 0 };
|
||||
int fd, saved_errno;
|
||||
GError *channel_error;
|
||||
GIOFlags channel_flags;
|
||||
@@ -323,8 +323,9 @@ nm_netlink_monitor_request_status (NmNetlinkMonitor *monitor,
|
||||
struct nlmsghdr header;
|
||||
struct rtgenmsg request;
|
||||
} NmNetlinkMonitorStatusPacket;
|
||||
NmNetlinkMonitorStatusPacket packet = { { 0 } };
|
||||
struct sockaddr_nl recipient = { 0 };
|
||||
|
||||
NmNetlinkMonitorStatusPacket packet;
|
||||
struct sockaddr_nl recipient = { .nl_pad = 0 };
|
||||
static guint32 sequence_number;
|
||||
int fd, saved_errno;
|
||||
ssize_t num_bytes_sent;
|
||||
@@ -339,6 +340,7 @@ nm_netlink_monitor_request_status (NmNetlinkMonitor *monitor,
|
||||
recipient.nl_pid = 0; /* going to kernel */
|
||||
recipient.nl_groups = RTMGRP_LINK;
|
||||
|
||||
memset (&packet, 0, sizeof (NmNetlinkMonitorStatusPacket));
|
||||
packet.header.nlmsg_len = NLMSG_LENGTH (sizeof (struct rtgenmsg));
|
||||
packet.header.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST;
|
||||
packet.header.nlmsg_type = RTM_GETLINK;
|
||||
@@ -432,7 +434,7 @@ receive_pending_bytes (GIOChannel *channel,
|
||||
GString *pending_bytes;
|
||||
ssize_t num_bytes_read;
|
||||
gboolean succeeded;
|
||||
struct sockaddr_nl sender = { 0 };
|
||||
struct sockaddr_nl sender = { .nl_pad = 0 };
|
||||
gchar buffer[4096];
|
||||
static const size_t buffer_capacity = (size_t) sizeof (buffer);
|
||||
socklen_t sender_size;
|
||||
|
Reference in New Issue
Block a user