(OPENZAP-12) fix param passing in ZIO_SIG_CONFIGURE_FUNCTION on some platforms
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@531 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
e8fd83456d
commit
b3cea0f20d
|
@ -409,7 +409,7 @@ typedef struct zap_io_interface zap_io_interface_t;
|
|||
#define ZIO_IO_LOAD_ARGS (zap_io_interface_t **zio)
|
||||
#define ZIO_IO_UNLOAD_ARGS (void)
|
||||
#define ZIO_SIG_LOAD_ARGS (void)
|
||||
#define ZIO_SIG_CONFIGURE_ARGS (zap_span_t *span, zio_signal_cb_t sig_cb, va_list ap)
|
||||
#define ZIO_SIG_CONFIGURE_ARGS (zap_span_t *span, zio_signal_cb_t sig_cb, ...)
|
||||
#define ZIO_SIG_UNLOAD_ARGS (void)
|
||||
|
||||
typedef zap_status_t (*zio_channel_request_t) ZIO_CHANNEL_REQUEST_ARGS ;
|
||||
|
|
|
@ -87,6 +87,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_analog_configure_span)
|
|||
uint32_t max_dialstr = 11;
|
||||
const char *var, *val;
|
||||
int *intval;
|
||||
va_list ap;
|
||||
|
||||
assert(sig_cb != NULL);
|
||||
|
||||
|
@ -104,9 +105,10 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_analog_configure_span)
|
|||
}
|
||||
|
||||
analog_data = malloc(sizeof(*analog_data));
|
||||
memset(analog_data, 0, sizeof(*analog_data));
|
||||
assert(analog_data != NULL);
|
||||
memset(analog_data, 0, sizeof(*analog_data));
|
||||
|
||||
va_start(ap, sig_cb);
|
||||
while ((var = va_arg(ap, char *))) {
|
||||
if (!strcasecmp(var, "tonemap")) {
|
||||
if (!(val = va_arg(ap, char *))) {
|
||||
|
@ -125,6 +127,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_analog_configure_span)
|
|||
max_dialstr = *intval;
|
||||
}
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
span->start = zap_analog_start;
|
||||
analog_data->digit_timeout = digit_timeout;
|
||||
|
|
|
@ -1327,6 +1327,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_isdn_configure_span)
|
|||
char *var, *val;
|
||||
Q931Dialect_t dialect = Q931_Dialect_National;
|
||||
uint32_t opts = 0;
|
||||
va_list ap;
|
||||
|
||||
if (span->signal_type) {
|
||||
snprintf(span->last_error, sizeof(span->last_error), "Span is already configured for signalling [%d].", span->signal_type);
|
||||
|
@ -1365,6 +1366,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_isdn_configure_span)
|
|||
isdn_data->mode = Q931_TE;
|
||||
dialect = Q931_Dialect_National;
|
||||
|
||||
va_start(ap, sig_cb);
|
||||
while((var = va_arg(ap, char *))) {
|
||||
if (!strcasecmp(var, "mode")) {
|
||||
if (!(val = va_arg(ap, char *))) {
|
||||
|
@ -1387,6 +1389,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_isdn_configure_span)
|
|||
opts = isdn_data->opts = *optp;
|
||||
}
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
span->start = zap_isdn_start;
|
||||
isdn_data->sig_cb = sig_cb;
|
||||
|
|
|
@ -1095,7 +1095,9 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_ss7_boost_configure_span)
|
|||
int local_port = 5300, remote_port = 5300;
|
||||
char *var, *val;
|
||||
int *intval;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, sig_cb);
|
||||
while((var = va_arg(ap, char *))) {
|
||||
if (!strcasecmp(var, "local_ip")) {
|
||||
if (!(val = va_arg(ap, char *))) {
|
||||
|
@ -1119,6 +1121,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_ss7_boost_configure_span)
|
|||
remote_port = *intval;
|
||||
}
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
|
||||
if (!local_ip && local_port && remote_ip && remote_port && sig_cb) {
|
||||
|
|
Loading…
Reference in New Issue