2005-07-26 Robert Love <rml@novell.com>

* src/backends/NetworkManagerSuSE.c: misc. cleanup


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@812 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Robert Love
2005-07-26 16:02:13 +00:00
committed by Robert Love
parent e0dc734a42
commit 17ff83bd08
2 changed files with 28 additions and 22 deletions

View File

@@ -1,3 +1,7 @@
2005-07-26 Robert Love <rml@novell.com>
* src/backends/NetworkManagerSuSE.c: misc. cleanup
2005-07-25 Robert Love <rml@novell.com> 2005-07-25 Robert Love <rml@novell.com>
* gnome/applet/applet.c: make the "Wired" menu item a radio button, * gnome/applet/applet.c: make the "Wired" menu item a radio button,

View File

@@ -150,7 +150,7 @@ void nm_system_device_add_route_via_device_with_iface (const char *iface, const
*/ */
gboolean nm_system_device_has_active_routes (NMDevice *dev) gboolean nm_system_device_has_active_routes (NMDevice *dev)
{ {
return (FALSE); return FALSE;
} }
@@ -277,8 +277,7 @@ void nm_system_update_dns (void)
/* /*
* nm_system_load_device_modules * nm_system_load_device_modules
* *
* Load any network adapter kernel modules that we need to, since Fedora doesn't * Load any network adapter kernel modules that we need.
* autoload them at this time.
* *
*/ */
void nm_system_load_device_modules (void) void nm_system_load_device_modules (void)
@@ -295,19 +294,22 @@ void nm_system_load_device_modules (void)
*/ */
void nm_system_restart_mdns_responder (void) void nm_system_restart_mdns_responder (void)
{ {
FILE *fp = NULL; pid_t pid;
FILE *fp;
int res;
if ((fp = fopen ("/var/run/mdnsd.pid", "rt"))) fp = fopen ("/var/run/mdnsd.pid", "rt");
{ if (!fp)
int pid; return;
int res = fscanf (fp, "%d", &pid);
fclose (fp); res = fscanf (fp, "%d", &pid);
if (res == 1) if (res == 1)
{ {
nm_info ("Restarting mdnsd."); nm_info ("Restarting mdnsd (pid=%d).", pid);
kill (pid, SIGUSR1); kill (pid, SIGUSR1);
} }
}
fclose (fp);
} }
@@ -323,7 +325,7 @@ void nm_system_device_add_ip6_link_address (NMDevice *dev)
struct ether_addr hw_addr; struct ether_addr hw_addr;
unsigned char eui[8]; unsigned char eui[8];
nm_device_get_hw_address(dev, &hw_addr); nm_device_get_hw_address (dev, &hw_addr);
memcpy (eui, &(hw_addr.ether_addr_octet), sizeof (hw_addr.ether_addr_octet)); memcpy (eui, &(hw_addr.ether_addr_octet), sizeof (hw_addr.ether_addr_octet));
memmove (eui+5, eui+3, 3); memmove (eui+5, eui+3, 3);
@@ -354,8 +356,8 @@ typedef struct SuSESystemConfigData
*/ */
static void set_ip4_config_from_resolv_conf (const char *filename, NMIP4Config *ip4_config) static void set_ip4_config_from_resolv_conf (const char *filename, NMIP4Config *ip4_config)
{ {
char * contents = NULL; char *contents = NULL;
char ** split_contents = NULL; char **split_contents = NULL;
int i, len; int i, len;
g_return_if_fail (filename != NULL); g_return_if_fail (filename != NULL);
@@ -614,7 +616,7 @@ out:
} }
nm_debug ("---------------------\n"); nm_debug ("---------------------\n");
return (void *)sys_data; return sys_data;
} }