add some libtool usage in openzap build. This will require re-bootstrap and configure

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@534 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris
2008-09-06 05:46:14 +00:00
parent 9060a74517
commit cb92fcdf43
17 changed files with 10892 additions and 99 deletions

View File

@@ -16,7 +16,7 @@ int main(int argc, char *argv[])
teletone_dtmf_detect_init (&dtmf_detect, 8000);
if ((fd = open(argv[1], O_RDONLY)) < 0) {
fprintf(stderr, "File Error!\n", strerror(errno));
fprintf(stderr, "File Error! [%s]\n", strerror(errno));
exit(-1);
}
@@ -28,5 +28,6 @@ int main(int argc, char *argv[])
}
}
close(fd);
return 0;
}

View File

@@ -3,9 +3,8 @@
int main(int argc, char *argv[])
{
teletone_generation_session_t ts;
teletone_multi_tone_t mt = {0};
teletone_tone_map_t map = {0};
teletone_tone_map_t map = {{0}};
int fd, b;
short sln[512] = {0};
@@ -15,14 +14,12 @@ int main(int argc, char *argv[])
exit(-1);
}
map.freqs[0] = atof("350");
map.freqs[1] = atof("440");
teletone_multi_tone_init(&mt, &map);
if ((fd = open(argv[1], O_RDONLY)) < 0) {
fprintf(stderr, "File Error!\n", strerror(errno));
fprintf(stderr, "File Error! [%s]\n", strerror(errno));
exit(-1);
}
@@ -30,5 +27,6 @@ int main(int argc, char *argv[])
printf("TEST %d %d\n", b, teletone_multi_tone_detect(&mt, sln, b / 2));
}
close(fd);
return 0;
}

View File

@@ -533,9 +533,9 @@ zap_status_t zap_fsk_demod_feed(zap_fsk_data_state_t *state, int16_t *data, size
zap_status_t zap_fsk_demod_destroy(zap_fsk_data_state_t *state);
int zap_fsk_demod_init(zap_fsk_data_state_t *state, int rate, uint8_t *buf, size_t bufsize);
zap_status_t zap_fsk_data_init(zap_fsk_data_state_t *state, uint8_t *data, uint32_t datalen);
zap_status_t zap_fsk_data_add_mdmf(zap_fsk_data_state_t *state, zap_mdmf_type_t type, uint8_t *data, uint32_t datalen);
zap_status_t zap_fsk_data_add_mdmf(zap_fsk_data_state_t *state, zap_mdmf_type_t type, const uint8_t *data, uint32_t datalen);
zap_status_t zap_fsk_data_add_checksum(zap_fsk_data_state_t *state);
zap_status_t zap_fsk_data_add_sdmf(zap_fsk_data_state_t *state, char *date, char *number);
zap_status_t zap_fsk_data_add_sdmf(zap_fsk_data_state_t *state, const char *date, char *number);
zap_status_t zap_channel_outgoing_call(zap_channel_t *zchan);
void zap_channel_rotate_tokens(zap_channel_t *zchan);
void zap_channel_clear_detected_tones(zap_channel_t *zchan);

View File

@@ -6,14 +6,14 @@ static void *test_call(zap_thread_t *me, void *obj)
zap_channel_t *chan = (zap_channel_t *) obj;
uint8_t frame[1024];
zap_size_t len;
char *number = strdup("5551212");
zap_sleep(10 * 1000);
zap_log(ZAP_LOG_DEBUG, "answer call and start echo test\n");
zap_set_state_locked(chan, ZAP_CHANNEL_STATE_UP);
zap_channel_command(chan, ZAP_COMMAND_SEND_DTMF, "5551212");
zap_channel_command(chan, ZAP_COMMAND_SEND_DTMF, number);
while (chan->state == ZAP_CHANNEL_STATE_UP) {
zap_wait_flag_t flags = ZAP_READ;
@@ -37,8 +37,8 @@ static void *test_call(zap_thread_t *me, void *obj)
}
zap_log(ZAP_LOG_DEBUG, "call over\n");
return 0;
free(number);
return NULL;
}
static ZIO_SIGNAL_CB_FUNCTION(on_signal)
@@ -59,12 +59,14 @@ static ZIO_SIGNAL_CB_FUNCTION(on_signal)
}
static int R = 0;
#if 0
static void handle_SIGINT(int sig)
{
if (sig);
R = 0;
return;
}
#endif
int main(int argc, char *argv[])
{
@@ -113,7 +115,7 @@ int main(int argc, char *argv[])
done:
zap_global_destroy();
return 0;
}
/* For Emacs:

View File

@@ -67,10 +67,8 @@ int main(int argc, char *argv[])
goto top;
}
end:
zap_global_destroy();
return 0;
}
/* For Emacs:

View File

@@ -6,13 +6,14 @@ static ZIO_SIGNAL_CB_FUNCTION(on_signal)
}
static int R = 0;
#if 0
static void handle_SIGINT(int sig)
{
if (sig);
R = 0;
return;
}
#endif
int main(int argc, char *argv[])
{
zap_span_t *span;
@@ -59,6 +60,7 @@ int main(int argc, char *argv[])
zap_global_destroy();
return 0;
}
/* For Emacs:

View File

@@ -1,4 +1,5 @@
#include "openzap.h"
zap_status_t my_write_sample(int16_t *buf, zap_size_t buflen, void *user_data);
struct helper {
int fd;
@@ -7,8 +8,6 @@ struct helper {
zap_status_t my_write_sample(int16_t *buf, zap_size_t buflen, void *user_data)
{
int x ;
struct helper *foo = (struct helper *) user_data;
write(foo->fd, buf, buflen * 2);
foo->wrote += buflen * 2;
@@ -28,17 +27,17 @@ int main(int argc, char *argv[])
char fbuf[256];
uint8_t databuf[1024] = "";
struct helper foo = {0};
int x, bytes, start_bits = 180, stop_bits = 5, sbits = 300;
// int x, bytes, start_bits = 180, stop_bits = 5, sbits = 300;
char time_str[9];
struct tm tm;
time_t now;
if (argc < 2) {
int x;
char *url = "sip:cool@rad.com";
const char *url = "sip:cool@rad.com";
if ((fd = open("tone.raw", O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR)) < 0) {
fprintf(stderr, "File Error!\n", strerror(errno));
fprintf(stderr, "File Error! [%s]\n", strerror(errno));
exit(-1);
}
@@ -103,4 +102,5 @@ int main(int argc, char *argv[])
zap_fsk_demod_destroy(&fsk_data);
close(fd);
return 0;
}

View File

@@ -58,6 +58,8 @@ int main(int argc, char *argv[])
zap_global_destroy();
return 1;
}
/* For Emacs:

View File

@@ -26,18 +26,18 @@ int main(int argc, char *argv[])
}
if ((tmp.fd = open(argv[1], O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR)) < 0) {
fprintf(stderr, "File Error!\n", strerror(errno));
fprintf(stderr, "File Error! [%s]\n", strerror(errno));
exit(-1);
}
teletone_init_session(&ts, 0, teletone_handler, &tmp);
ts.rate = 8000;
ts.debug = 1;
ts.debug_stream = stdout;
teletone_run(&ts, argv[2]);
close(tmp.fd);
return 0;
}
#else
int32_t main(int argc, char *argv[])

View File

@@ -47,7 +47,7 @@ zap_status_t zap_fsk_data_init(zap_fsk_data_state_t *state, uint8_t *data, uint3
return ZAP_SUCCESS;
}
zap_status_t zap_fsk_data_add_sdmf(zap_fsk_data_state_t *state, char *date, char *number)
zap_status_t zap_fsk_data_add_sdmf(zap_fsk_data_state_t *state, const char *date, char *number)
{
size_t dlen = strlen(date);
size_t nlen = strlen(number);
@@ -61,7 +61,7 @@ zap_status_t zap_fsk_data_add_sdmf(zap_fsk_data_state_t *state, char *date, char
return ZAP_SUCCESS;
}
zap_status_t zap_fsk_data_add_mdmf(zap_fsk_data_state_t *state, zap_mdmf_type_t type, uint8_t *data, uint32_t datalen)
zap_status_t zap_fsk_data_add_mdmf(zap_fsk_data_state_t *state, zap_mdmf_type_t type, const uint8_t *data, uint32_t datalen)
{
state->buf[0] = ZAP_CID_TYPE_MDMF;
state->buf[state->bpos++] = type;