Revision
14951
Author
gmaruzz
Date
2009-09-23 03:34:29 -0500 (Wed, 23 Sep 2009)

Log Message

celliax: do not load the module is serial init error

Modified Paths

Diff

Modified: freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c (14950 => 14951)


--- freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c	2009-09-23 07:52:24 UTC (rev 14950)
+++ freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c	2009-09-23 08:34:29 UTC (rev 14951)
@@ -1171,7 +1171,7 @@
 			char *context = "default";
 			char *dialplan = "XML";
 			char *destination = "5000";
-			char *controldevice_name = "/dev/ttyACM0";
+			char *controldevice_name = "/dev/ttyACM1";
 			char *digit_timeout = NULL;
 			char *max_digits = NULL;
 			char *hotline = NULL;
@@ -1437,6 +1437,7 @@
 						celliax_serial_init(&globals.CELLIAX_INTERFACES[interface_id], globals.CELLIAX_INTERFACES[interface_id].controldevice_speed);
 					if (globals.CELLIAX_INTERFACES[interface_id].controldevfd < 1) {
 						ERRORA("celliax_serial_init failed\n", CELLIAX_P_LOG);
+						return SWITCH_STATUS_FALSE;
 						//celliax_sound_shutdown(tmp);
 						//if (tmp)
 						//free(tmp);
@@ -1450,6 +1451,7 @@
 					res = celliax_serial_config(&globals.CELLIAX_INTERFACES[interface_id]);
 					if (res) {
 						ERRORA("celliax_serial_config failed\n", CELLIAX_P_LOG);
+						return SWITCH_STATUS_FALSE;
 						//celliax_sound_shutdown(tmp);
 						//if (tmp)
 						//free(tmp);