diff --git a/libs/openzap/Makefile.in b/libs/openzap/Makefile.in index 3a1f4eb2d9..68eef4694f 100644 --- a/libs/openzap/Makefile.in +++ b/libs/openzap/Makefile.in @@ -176,8 +176,6 @@ PIKA_LIB=$(shell ls /usr/lib/libpikahmpapi.so 2>/dev/null) all: $(MYLIB) analogmod isdnmod boostmod ztmod wpmod $(MYLIB): $(OBJS) $(HEADERS) $(SOURCES) - #ar rcs $(MYLIB) $(OBJS) $(ADD_OBJS) - #ranlib $(MYLIB) $(CC) -shared -Wl,-x -o $(MYLIB) $(OBJS) $(ADD_OBJS) -ldl testapp: $(SRC)/testapp.c $(MYLIB) @@ -255,35 +253,35 @@ uninstall: @rm -fr $(DESTDIR)$(PREFIX) $(SRC)/ozmod/ozmod_skel/ozmod_skel.so: $(SRC)/ozmod/ozmod_skel/ozmod_skel.c - $(CC) $(INCS) $(ZAP_CFLAGS) -L. $(SRC)/ozmod/ozmod_skel/ozmod_skel.c -o $(SRC)/ozmod/ozmod_skel/ozmod_skel.so -shared -Wl,-x -lm -lpthread -ldl -Wl,--rpath -Wl,$(PREFIX)/lib + $(CC) $(INCS) $(CFLAGS) -L. $(SRC)/ozmod/ozmod_skel/ozmod_skel.c -o $(SRC)/ozmod/ozmod_skel/ozmod_skel.so -shared -Wl,-x -lm -lpthread -ldl -Wl,--rpath -Wl,$(PREFIX)/lib skelmod: $(SRC)/ozmod/ozmod_skel/ozmod_skel.so $(SRC)/ozmod/ozmod_zt/ozmod_zt.so: $(SRC)/ozmod/ozmod_zt/ozmod_zt.c - $(CC) $(INCS) $(ZAP_CFLAGS) -L. $(SRC)/ozmod/ozmod_zt/ozmod_zt.c -o $(SRC)/ozmod/ozmod_zt/ozmod_zt.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib + $(CC) $(INCS) $(CFLAGS) -L. $(SRC)/ozmod/ozmod_zt/ozmod_zt.c -o $(SRC)/ozmod/ozmod_zt/ozmod_zt.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib ztmod: $(SRC)/ozmod/ozmod_zt/ozmod_zt.so $(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.so: $(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.c - $(CC) $(INCS) $(ZAP_CFLAGS) -L. $(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.c -o $(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib + $(CC) $(INCS) $(CFLAGS) -L. $(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.c -o $(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib wpmod: $(SRC)/ozmod/ozmod_wanpipe/ozmod_wanpipe.so $(SRC)/ozmod/ozmod_pika/ozmod_pika.so: $(SRC)/ozmod/ozmod_pika/ozmod_pika.c - $(CC) -I$(PIKA_DIR) $(INCS) $(ZAP_CFLAGS) -L. $(SRC)/ozmod/ozmod_pika/ozmod_pika.c -o $(SRC)/ozmod/ozmod_pika/ozmod_pika.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) $(PIKA_LIB) -Wl,--rpath -Wl,$(PREFIX)/lib + $(CC) -I$(PIKA_DIR) $(INCS) $(CFLAGS) -L. $(SRC)/ozmod/ozmod_pika/ozmod_pika.c -o $(SRC)/ozmod/ozmod_pika/ozmod_pika.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) $(PIKA_LIB) -Wl,--rpath -Wl,$(PREFIX)/lib pikamod: $(SRC)/ozmod/ozmod_pika/ozmod_pika.so $(ISDN_OBJS): $(ISDN_HEADERS) $(ISDN_SOURCES) $(SRC)/ozmod/ozmod_isdn/ozmod_isdn.c $(SRC)/ozmod/ozmod_isdn/ozmod_isdn.so: $(MYLIB) $(ISDN_OBJS) - $(CC) -I$(SRC)/isdn/include/ $(INCS) $(ZAP_CFLAGS) -L. $(ISDN_OBJS) $(SRC)/ozmod/ozmod_isdn/ozmod_isdn.c -o $(SRC)/ozmod/ozmod_isdn/ozmod_isdn.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib + $(CC) -I$(SRC)/isdn/include/ $(INCS) $(CFLAGS) -L. $(ISDN_OBJS) $(SRC)/ozmod/ozmod_isdn/ozmod_isdn.c -o $(SRC)/ozmod/ozmod_isdn/ozmod_isdn.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib isdnmod: $(SRC)/ozmod/ozmod_isdn/ozmod_isdn.so $(SRC)/ozmod/ozmod_analog/ozmod_analog.so: $(MYLIB) $(ANALOG_OBJS) $(SRC)/ozmod/ozmod_analog/ozmod_analog.c - $(CC) -I$(SRC)/analog/include/ $(INCS) $(ZAP_CFLAGS) -L. $(SRC)/ozmod/ozmod_analog/ozmod_analog.c -o $(SRC)/ozmod/ozmod_analog/ozmod_analog.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib + $(CC) -I$(SRC)/analog/include/ $(INCS) $(CFLAGS) -L. $(SRC)/ozmod/ozmod_analog/ozmod_analog.c -o $(SRC)/ozmod/ozmod_analog/ozmod_analog.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib analogmod: $(SRC)/ozmod/ozmod_analog/ozmod_analog.so $(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.so: $(MYLIB) $(BOOST_OBJS) $(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.c - $(CC) -I/ozmod/ozmod_ss7_boost $(INCS) $(ZAP_CFLAGS) -L. $(BOOST_OBJS) $(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.c -o $(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib + $(CC) -I/ozmod/ozmod_ss7_boost $(INCS) $(CFLAGS) -L. $(BOOST_OBJS) $(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.c -o $(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.so -shared -Wl,-x -lm -lpthread -ldl $(MYLIB) -Wl,--rpath -Wl,$(PREFIX)/lib boostmod: $(SRC)/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.so diff --git a/libs/openzap/src/include/openzap.h b/libs/openzap/src/include/openzap.h index d29bd26db6..d65b9ef68e 100644 --- a/libs/openzap/src/include/openzap.h +++ b/libs/openzap/src/include/openzap.h @@ -545,7 +545,7 @@ zap_status_t zap_channel_send_fsk_data(zap_channel_t *zchan, zap_fsk_data_state_ zap_status_t zap_channel_clear_token(zap_channel_t *zchan, const char *token); zap_status_t zap_channel_add_token(zap_channel_t *zchan, char *token, int end); zap_status_t zap_channel_set_state(zap_channel_t *zchan, zap_channel_state_t state, int lock); -zap_status_t zap_span_load_tones(zap_span_t *span, char *mapname); +zap_status_t zap_span_load_tones(zap_span_t *span, const char *mapname); zap_size_t zap_channel_dequeue_dtmf(zap_channel_t *zchan, char *dtmf, zap_size_t len); zap_status_t zap_channel_queue_dtmf(zap_channel_t *zchan, const char *dtmf); void zap_channel_flush_dtmf(zap_channel_t *zchan); diff --git a/libs/openzap/src/ozmod/ozmod_analog/ozmod_analog.c b/libs/openzap/src/ozmod/ozmod_analog/ozmod_analog.c index 3d04425880..6bf8b86977 100644 --- a/libs/openzap/src/ozmod/ozmod_analog/ozmod_analog.c +++ b/libs/openzap/src/ozmod/ozmod_analog/ozmod_analog.c @@ -82,10 +82,10 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_analog_configure_span) //zap_status_t zap_analog_configure_span(zap_span_t *span, char *tonemap, uint32_t digit_timeout, uint32_t max_dialstr, zio_signal_cb_t sig_cb) { zap_analog_data_t *analog_data; - char *tonemap = "us"; + const char *tonemap = "us"; uint32_t digit_timeout = 10; uint32_t max_dialstr = 11; - char *var, *val; + const char *var, *val; int *intval; assert(sig_cb != NULL); @@ -107,7 +107,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_analog_configure_span) memset(analog_data, 0, sizeof(*analog_data)); assert(analog_data != NULL); - while(var = va_arg(ap, char *)) { + while ((var = va_arg(ap, char *))) { if (!strcasecmp(var, "tonemap")) { if (!(val = va_arg(ap, char *))) { break; diff --git a/libs/openzap/src/ozmod/ozmod_isdn/ozmod_isdn.c b/libs/openzap/src/ozmod/ozmod_isdn/ozmod_isdn.c index df6e116dad..5e86199d89 100644 --- a/libs/openzap/src/ozmod/ozmod_isdn/ozmod_isdn.c +++ b/libs/openzap/src/ozmod/ozmod_isdn/ozmod_isdn.c @@ -1365,7 +1365,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_isdn_configure_span) isdn_data->mode = Q931_TE; dialect = Q931_Dialect_National; - while(var = va_arg(ap, char *)) { + while((var = va_arg(ap, char *))) { if (!strcasecmp(var, "mode")) { if (!(val = va_arg(ap, char *))) { break; diff --git a/libs/openzap/src/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.c b/libs/openzap/src/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.c index 14086a5154..7a3e08d2ce 100644 --- a/libs/openzap/src/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.c +++ b/libs/openzap/src/ozmod/ozmod_ss7_boost/ozmod_ss7_boost.c @@ -1091,12 +1091,12 @@ static zap_state_map_t boost_state_map = { static ZIO_SIG_CONFIGURE_FUNCTION(zap_ss7_boost_configure_span) { zap_ss7_boost_data_t *ss7_boost_data = NULL; - char *local_ip = "127.0.0.65", *remote_ip = "127.0.0.66"; + const char *local_ip = "127.0.0.65", *remote_ip = "127.0.0.66"; int local_port = 5300, remote_port = 5300; char *var, *val; int *intval; - while(var = va_arg(ap, char *)) { + while((var = va_arg(ap, char *))) { if (!strcasecmp(var, "local_ip")) { if (!(val = va_arg(ap, char *))) { break; diff --git a/libs/openzap/src/zap_io.c b/libs/openzap/src/zap_io.c index 8ab35179f4..67a9ae690f 100644 --- a/libs/openzap/src/zap_io.c +++ b/libs/openzap/src/zap_io.c @@ -349,7 +349,7 @@ zap_status_t zap_span_close_all(void) return i ? ZAP_SUCCESS : ZAP_FAIL; } -zap_status_t zap_span_load_tones(zap_span_t *span, char *mapname) +zap_status_t zap_span_load_tones(zap_span_t *span, const char *mapname) { zap_config_t cfg; char *var, *val;