2004-09-22 <clarkbw@cvs.gnome.org>
* initscript/Debian/.cvsignore: * initscript/Slackware/.cvsignore: Added new cvsignores for Makefile, Makefile.in * test/.cvsignore: Added nmtestdevices * src/NetworkManagerDevice.c: * src/NetworkManager.c: Updated the wireless/wired HAL device strings from net.ethernet to net.80203 or net.80211 depending on wired or wireless respectively Should probably update the configure.in to ask for the correct HAL version now. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@168 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
12
ChangeLog
12
ChangeLog
@@ -1,5 +1,17 @@
|
|||||||
2004-09-22 <clarkbw@cvs.gnome.org>
|
2004-09-22 <clarkbw@cvs.gnome.org>
|
||||||
|
|
||||||
|
* initscript/Debian/.cvsignore:
|
||||||
|
* initscript/Slackware/.cvsignore:
|
||||||
|
Added new cvsignores for Makefile, Makefile.in
|
||||||
|
|
||||||
|
* test/.cvsignore:
|
||||||
|
Added nmtestdevices
|
||||||
|
|
||||||
|
* src/NetworkManagerDevice.c:
|
||||||
|
* src/NetworkManager.c:
|
||||||
|
Updated the wireless/wired HAL device strings from net.ethernet to
|
||||||
|
net.80203 or net.80211 depending on wired or wireless respectively
|
||||||
|
|
||||||
* examples/python/NetworkManager.py:
|
* examples/python/NetworkManager.py:
|
||||||
s/Quality/Strength/
|
s/Quality/Strength/
|
||||||
|
|
||||||
|
@@ -48,19 +48,34 @@ class NetworkManager:
|
|||||||
self.__devices = {}
|
self.__devices = {}
|
||||||
|
|
||||||
def __init_dbus__(self):
|
def __init_dbus__(self):
|
||||||
|
try:
|
||||||
self._bus = dbus.SystemBus()
|
self._bus = dbus.SystemBus()
|
||||||
|
try:
|
||||||
self._nm_service = self._bus.get_service(NM_SERVICE)
|
self._nm_service = self._bus.get_service(NM_SERVICE)
|
||||||
self.nm_object = self._nm_service.get_object(NM_PATH,
|
self.nm_object = self._nm_service.get_object(NM_PATH,
|
||||||
NM_INTERFACE)
|
NM_INTERFACE)
|
||||||
|
except Exception, e:
|
||||||
|
print "Counldn't get the %s service" % NM_SERVICE
|
||||||
|
print e
|
||||||
|
|
||||||
|
try:
|
||||||
self._nmi_service = self._bus.get_service(NMI_SERVICE)
|
self._nmi_service = self._bus.get_service(NMI_SERVICE)
|
||||||
self.nmi_object = self._nmi_service.get_object(NMI_PATH,
|
self.nmi_object = self._nmi_service.get_object(NMI_PATH,
|
||||||
NMI_INTERFACE)
|
NMI_INTERFACE)
|
||||||
|
except Exception, e:
|
||||||
|
print "Counldn't get the %s service" % NMI_SERVICE
|
||||||
|
print e
|
||||||
|
|
||||||
|
try:
|
||||||
self._hal_service = self._bus.get_service(HAL_SERVICE)
|
self._hal_service = self._bus.get_service(HAL_SERVICE)
|
||||||
self._hal_manager = self._hal_service.get_object(HAL_PATH,
|
self._hal_manager = self._hal_service.get_object(HAL_PATH,
|
||||||
HAL_INTERFACE)
|
HAL_INTERFACE)
|
||||||
|
except Exception, e:
|
||||||
|
print "Counldn't get the %s service" % HAL_SERVICE
|
||||||
|
print e
|
||||||
|
|
||||||
|
except Exception, e:
|
||||||
|
print e
|
||||||
|
|
||||||
"""
|
"""
|
||||||
returns dictionary of the active device information
|
returns dictionary of the active device information
|
||||||
|
2
initscript/Debian/.cvsignore
Normal file
2
initscript/Debian/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Makefile
|
||||||
|
Makefile.in
|
2
initscript/Slackware/.cvsignore
Normal file
2
initscript/Slackware/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Makefile
|
||||||
|
Makefile.in
|
@@ -258,7 +258,7 @@ static void nm_hal_device_new_capability (LibHalContext *ctx, const char *udi, c
|
|||||||
|
|
||||||
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.ethernet") == 0))
|
if (capability && ((strcmp (capability, "net.80203") == 0) || (strcmp (capability, "net.80211") == 0)))
|
||||||
{
|
{
|
||||||
char *iface;
|
char *iface;
|
||||||
|
|
||||||
@@ -308,7 +308,7 @@ static void nm_add_initial_devices (NMData *data)
|
|||||||
g_return_if_fail (data != NULL);
|
g_return_if_fail (data != NULL);
|
||||||
|
|
||||||
/* Grab a list of network devices */
|
/* Grab a list of network devices */
|
||||||
net_devices = hal_find_device_by_capability (data->hal_ctx, "net.ethernet", &num_net_devices);
|
net_devices = hal_find_device_by_capability (data->hal_ctx, "net", &num_net_devices);
|
||||||
if (net_devices)
|
if (net_devices)
|
||||||
{
|
{
|
||||||
for (i = 0; i < num_net_devices; i++)
|
for (i = 0; i < num_net_devices; i++)
|
||||||
|
@@ -507,7 +507,7 @@ static gboolean nm_device_wireless_link_active (NMDevice *dev)
|
|||||||
* nm_device_wired_link_active
|
* nm_device_wired_link_active
|
||||||
*
|
*
|
||||||
* Return the link state of a wired device. We usually just grab the HAL
|
* Return the link state of a wired device. We usually just grab the HAL
|
||||||
* net.ethernet.link property, but on card insertion we need to check the MII
|
* net.80203.link property, but on card insertion we need to check the MII
|
||||||
* registers of the card to get a more accurate response, since HAL may not
|
* registers of the card to get a more accurate response, since HAL may not
|
||||||
* have received a netlink socket link event for the device yet, and therefore
|
* have received a netlink socket link event for the device yet, and therefore
|
||||||
* will return FALSE when the device really does have a link.
|
* will return FALSE when the device really does have a link.
|
||||||
@@ -526,8 +526,8 @@ static gboolean nm_device_wired_link_active (NMDevice *dev, gboolean check_mii)
|
|||||||
|
|
||||||
if (check_mii)
|
if (check_mii)
|
||||||
link = mii_get_link (dev);
|
link = mii_get_link (dev);
|
||||||
else if (hal_device_property_exists (dev->app_data->hal_ctx, nm_device_get_udi (dev), "net.ethernet.link"))
|
else if (hal_device_property_exists (dev->app_data->hal_ctx, nm_device_get_udi (dev), "net.80203.link"))
|
||||||
link = hal_device_get_property_bool (dev->app_data->hal_ctx, nm_device_get_udi (dev), "net.ethernet.link");
|
link = hal_device_get_property_bool (dev->app_data->hal_ctx, nm_device_get_udi (dev), "net.80203.link");
|
||||||
|
|
||||||
return (link);
|
return (link);
|
||||||
}
|
}
|
||||||
|
@@ -2,3 +2,4 @@ Makefile
|
|||||||
Makefile.in
|
Makefile.in
|
||||||
nminfotest
|
nminfotest
|
||||||
nmtest
|
nmtest
|
||||||
|
nmtestdevices
|
||||||
|
Reference in New Issue
Block a user