diff --git a/libs/freetdm/src/zap_analog.c b/libs/freetdm/src/zap_analog.c index 7290d38d88..eb4337b156 100644 --- a/libs/freetdm/src/zap_analog.c +++ b/libs/freetdm/src/zap_analog.c @@ -143,7 +143,10 @@ static void *zap_analog_channel_run(zap_thread_t *me, void *obj) zap_set_flag_locked(chan, ZAP_CHANNEL_INTHREAD); teletone_init_session(&ts, 0, teletone_handler, dt_buffer); ts.rate = 8000; - +#if 0 + ts.debug = 1; + ts.debug_stream = stdout; +#endif zap_channel_command(chan, ZAP_COMMAND_GET_INTERVAL, &interval); zap_buffer_set_loops(dt_buffer, -1); diff --git a/libs/freetdm/src/zap_config.c b/libs/freetdm/src/zap_config.c index e4d4116244..5974574805 100644 --- a/libs/freetdm/src/zap_config.c +++ b/libs/freetdm/src/zap_config.c @@ -157,7 +157,7 @@ int zap_config_next_pair(zap_config_t *cfg, char **var, char **val) } - if ((end = strchr(*var, '#')) != 0 || (end = strchr(*var, ';')) != 0) { + if (((end = strchr(*var, '#')) || (end = strchr(*var, ';'))) && *(end+1) == *end) { *end = '\0'; end--; } else if ((end = strchr(*var, '\n')) != 0) {