[Dextrose] [PATCH] Register session failed fix
Martin Abente
mabente at paraguayeduca.org
Fri Aug 6 14:56:15 EDT 2010
Martin Langhoff patch to solve registration session register failure.
side effects.
---
src/jarabe/model/network.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/jarabe/model/network.py b/src/jarabe/model/network.py
index 47db43f..218752c 100644
--- a/src/jarabe/model/network.py
+++ b/src/jarabe/model/network.py
@@ -27,6 +27,7 @@ import dbus.service
import gobject
import ConfigParser
import gconf
+import ctypes
from sugar import dispatch
from sugar import env
@@ -369,6 +370,16 @@ class NMSettingsConnection(dbus.service.Object):
if self._settings.connection.type == NM_CONNECTION_TYPE_802_11_WIRELESS:
self.save()
+ try:
+ # try to flush resolver cache - SL#1940
+ # ctypes' syntactic sugar does not work
+ # so we must get the func ptr explicitly
+ libc = ctypes.CDLL('libc.so.6')
+ res_init = getattr(libc, '__res_init')
+ res_init(None)
+ except:
+ logging.error('Error calling libc.__res_init')
+
def set_secrets(self, secrets):
self._secrets = secrets
if self._settings.connection.type == NM_CONNECTION_TYPE_802_11_WIRELESS:
--
1.6.0.4
More information about the Dextrose
mailing list