Ticket #1940: network.py.patch
File network.py.patch, 863 bytes (added by martin.langhoff, 13 years ago) |
---|
-
network.py
old new 25 25 import gobject 26 26 import ConfigParser 27 27 import gconf 28 import ctypes 28 29 29 30 from sugar import dispatch 30 31 from sugar import env … … 354 355 self._settings.connection.autoconnect = True 355 356 self.Updated(self._settings.get_dict()) 356 357 self.save() 358 try: 359 # try to flush resolver cache - SL#1940 360 # ctypes' syntactic sugar does not work 361 # so we must get the func ptr explicitly 362 libc = ctypes.CDLL('libc.so.6') 363 res_init = getattr(libc, '__res_init') 364 res_init(None) 365 except: 366 logging.error('Error calling libc.__res_init') 357 367 358 368 def set_disconnected(self): 359 369 if self._settings.connection.autoconnect: