Revision
15754
Author
gmaruzz
Date
2009-12-02 08:29:09 -0600 (Wed, 02 Dec 2009)

Log Message

gsmopen: fixed a close() on the serial port, was crashing the serial driver... doh

Modified Paths

Diff

Modified: freeswitch/branches/gmaruzz/mod_gsmopen/mod_gsmopen.cpp (15753 => 15754)


--- freeswitch/branches/gmaruzz/mod_gsmopen/mod_gsmopen.cpp	2009-12-02 14:24:52 UTC (rev 15753)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/mod_gsmopen.cpp	2009-12-02 14:29:09 UTC (rev 15754)
@@ -1817,10 +1817,16 @@
 			if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread) {
 				switch_thread_join(&status, globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread);
 			}
+
+			x = 10;
+			while (x) {			//FIXME 0.5 seconds?
+				x--;
+				switch_yield(50000);
+			}
 	fd = tech_pvt->controldevfd;
 		WARNINGA("SHUTDOWN tech_pvt->controldevfd=%d\n", GSMOPEN_P_LOG, tech_pvt->controldevfd);
 	if (fd) {
-		close(fd);
+		//close(fd);
 		//tech_pvt->controldevfd = -1;
 		WARNINGA("SHUTDOWN tech_pvt->controldevfd=%d\n", GSMOPEN_P_LOG, tech_pvt->controldevfd);
 	}