]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4906 --resolve
authorKen Rice <krice@freeswitch.org>
Tue, 12 Feb 2013 02:08:15 +0000 (20:08 -0600)
committerKen Rice <krice@freeswitch.org>
Tue, 12 Feb 2013 02:08:15 +0000 (20:08 -0600)
src/mod/applications/mod_spandsp/mod_spandsp.c
src/mod/applications/mod_spandsp/mod_spandsp.h
src/mod/applications/mod_spandsp/mod_spandsp_modem.c

index 56c4d36ac1b639158c6e143df6351f1854399358..e86d025a08f90abe169f91926e5f6ad7a673522c 100644 (file)
@@ -492,6 +492,7 @@ switch_status_t load_configuration(switch_bool_t reload)
 
        spandsp_globals.modem_dialplan = "XML";
        spandsp_globals.modem_context = "default";
+       spandsp_globals.modem_directory = "/dev";
        spandsp_globals.modem_count = 0;
 
 
@@ -532,6 +533,8 @@ switch_status_t load_configuration(switch_bool_t reload)
                                        } else {
                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid value [%d] for total-modems\n", tmp);
                                        }
+                               } else if (!strcmp(name, "directory")) {
+                                       spandsp_globals.modem_directory = switch_core_strdup(spandsp_globals.config_pool, value);
                                } else if (!strcmp(name, "dialplan")) {
                                        spandsp_globals.modem_dialplan = switch_core_strdup(spandsp_globals.config_pool, value);
                                } else if (!strcmp(name, "context")) {
index ce9618f5e015563dc6ccbbadc595da340bdc8c05..61344d89e9d86d86981a754cf0596c17b6cecbad 100644 (file)
@@ -74,6 +74,7 @@ struct spandsp_globals {
        int modem_verbose;
        char *modem_context;
        char *modem_dialplan;
+       char *modem_directory;
        switch_hash_t *tones;
        int tonedebug;
 };
index 3233a924d8a1f1f290df67db5113723367cf9fb5..baac2f35518d1b9115be6d082480a020690ec38a 100644 (file)
@@ -299,7 +299,8 @@ switch_status_t modem_init(modem_t *modem, modem_control_handler_t control_handl
 
 #ifndef WIN32
        modem->slot = globals.NEXT_ID++;
-       snprintf(modem->devlink, sizeof(modem->devlink), "/dev/FS%d", modem->slot);
+    
+       snprintf(modem->devlink, sizeof(modem->devlink), "%s/FS%d", spandsp_globals.modem_directory, modem->slot);
        
        unlink(modem->devlink);