r255 - in trunk/software/pyneod: . pygsm

smartphones-commits at lists.linuxtogo.org smartphones-commits at lists.linuxtogo.org
Fri Apr 25 19:32:13 CEST 2008


Author: emdete
Date: 2008-04-25 19:32:13 +0200 (Fri, 25 Apr 2008)
New Revision: 255

Modified:
   trunk/software/pyneod/pygsm/genericmodem.py
   trunk/software/pyneod/pypppd.py
Log:
fixed: hangup an initated call
release muxer line if pppd crashes


Modified: trunk/software/pyneod/pygsm/genericmodem.py
===================================================================
--- trunk/software/pyneod/pygsm/genericmodem.py	2008-04-25 15:42:06 UTC (rev 254)
+++ trunk/software/pyneod/pygsm/genericmodem.py	2008-04-25 17:32:13 UTC (rev 255)
@@ -337,8 +337,9 @@
 		self.request('A', parser=StandardParser())
 
 	def call_release(self):
-		# TODO if in dial break it
-		self.request('H', parser=StandardParser()) # TODO: 
+		if self.rr.request:
+			self.rr.write('\r\n')
+		self.request('H', parser=StandardParser())
 		#self.request('+CHUP', parser=StandardParser()) # neo1973 does not hangup on CHUP
 		self.request('+CPAS', self.responseCPAS) # request phone activity status
 

Modified: trunk/software/pyneod/pypppd.py
===================================================================
--- trunk/software/pyneod/pypppd.py	2008-04-25 15:42:06 UTC (rev 254)
+++ trunk/software/pyneod/pypppd.py	2008-04-25 17:32:13 UTC (rev 255)
@@ -7,6 +7,7 @@
 
 from time import time
 from os import system, kill, chmod
+from os.path import exists
 from stat import S_IRWXU, S_IRWXG, S_IRWXO
 from signal import SIGINT, signal
 from time import sleep
@@ -153,6 +154,9 @@
 					#LOG(LOG_INFO, __name__, 'Activate waiting for pppd')
 					#p, r = waitpid(self.cpid, 0)
 					#LOG(LOG_INFO, __name__, 'Activate pppd returned', r)
+					if exists(self.port):
+						try: open(self.port, 'rw').close()
+						except: pass
 				finally:
 					self.cpid = -1
 				system('ifdown usb0')




More information about the Smartphones-commits mailing list