]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix test programs build
authorMichael Jerris <mike@jerris.com>
Tue, 3 Feb 2009 19:48:04 +0000 (19:48 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 3 Feb 2009 19:48:04 +0000 (19:48 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@641 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/Makefile.am
libs/openzap/src/testapp.c
libs/openzap/src/testcid.c

index 12422eb372c97fc3e7ed0a7e40c7f9bcd1c29759..fdd183bfc71b4b27e47e94a06221e46b3ea2cde6 100644 (file)
@@ -84,13 +84,13 @@ MYLIB=libopenzap.la
 
 all: $(MYLIB) analogmod analog_emmod isdnmod boostmod ztmod wpmod
 
-noinst_PROGRAMS = testtones detect_tones detect_dtmf testisdn testboost testanalog #testapp testcid
-#testapp_SOURCES = $(SRC)/testapp.c
-#testapp_LDADD = libopenzap.la
-#testapp_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
-#testcid_SOURCES = $(SRC)/testcid.c
-#testcid_LDADD = libopenzap.la
-#testcid_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
+noinst_PROGRAMS = testtones detect_tones detect_dtmf testisdn testboost testanalog testapp testcid
+testapp_SOURCES = $(SRC)/testapp.c
+testapp_LDADD = libopenzap.la
+testapp_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
+testcid_SOURCES = $(SRC)/testcid.c
+testcid_LDADD = libopenzap.la
+testcid_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
 testtones_SOURCES = $(SRC)/testtones.c
 testtones_LDADD = libopenzap.la
 testtones_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
index 3a706edc95571d5c740cf0e333ff364f7f90e2f2..3450f8876274b2ddd66c3c1e5e44f7ee88fc0995 100644 (file)
@@ -45,13 +45,13 @@ int main(int argc, char *argv[])
                        zap_wait_flag_t flags = ZAP_READ;
 
                        if (zap_channel_wait(chan, &flags, -1) == ZAP_FAIL) {
-                               printf("wait FAIL! %d [%s]\n", len, chan->last_error);
+                               printf("wait FAIL! %lu [%s]\n", len, chan->last_error);
                        }
                        if (flags & ZAP_READ) {
                                if (zap_channel_read(chan, buf, &len) == ZAP_SUCCESS) {
-                                       printf("READ: %d\n", len); 
+                                       printf("READ: %lu\n", len); 
                                } else {
-                                       printf("READ FAIL! %d [%s]\n", len, chan->last_error);
+                                       printf("READ FAIL! %lu [%s]\n", len, chan->last_error);
                                        break;
                                }
                        } else {
index 0dd923393e82a4dd237bca1ee4f74044851de851..4b3e63ecdcc57c78b5f9017767e993ca6427b92f 100644 (file)
@@ -21,7 +21,7 @@ int main(int argc, char *argv[])
        int fd = -1;
        int16_t buf[160] = {0};
        ssize_t len = 0;
-       int type, mlen;
+       size_t type, mlen;
        char *sp;
        char str[128] = "";
        char fbuf[256];
@@ -49,12 +49,12 @@ int main(int argc, char *argv[])
                zap_fsk_data_init(&fsk_data, databuf, sizeof(databuf));
 #if 1
                
-               zap_fsk_data_add_mdmf(&fsk_data, MDMF_DATETIME, time_str, strlen(time_str));
+               zap_fsk_data_add_mdmf(&fsk_data, MDMF_DATETIME, (uint8_t *)time_str, strlen(time_str));
                //zap_fsk_data_add_mdmf(&fsk_data, MDMF_DATETIME, "06091213", 8);
-               zap_fsk_data_add_mdmf(&fsk_data, MDMF_PHONE_NUM, "14149361212", 7);
-               zap_fsk_data_add_mdmf(&fsk_data, MDMF_PHONE_NAME, "Fred Smith", 10);
+               zap_fsk_data_add_mdmf(&fsk_data, MDMF_PHONE_NUM, (uint8_t *)"14149361212", 7);
+               zap_fsk_data_add_mdmf(&fsk_data, MDMF_PHONE_NAME, (uint8_t *)"Fred Smith", 10);
                for(x = 0; x < 0; x++)
-                       zap_fsk_data_add_mdmf(&fsk_data, MDMF_ALT_ROUTE, url, strlen(url));
+                       zap_fsk_data_add_mdmf(&fsk_data, MDMF_ALT_ROUTE, (uint8_t *)url, strlen(url));
 #else
                zap_fsk_data_add_sdmf(&fsk_data, "06061234", "0");
                //zap_fsk_data_add_sdmf(&state, "06061234", "5551212");
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
                zap_fsk_modulator_init(&fsk_trans, FSK_BELL202, 8000, &fsk_data, -14, 180, 5, 300, my_write_sample, &foo);
                zap_fsk_modulator_send_all((&fsk_trans));
 
-               printf("%d %d %d\n", fsk_data.dlen, foo.wrote, fsk_trans.est_bytes);
+               printf("%lu %d %d\n", fsk_data.dlen, foo.wrote, fsk_trans.est_bytes);
 
                if (fd > -1) {
                        close (fd);
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
                return 0;
        }
 
-       if (zap_fsk_demod_init(&fsk_data, 8000, fbuf, sizeof(fbuf))) {
+       if (zap_fsk_demod_init(&fsk_data, 8000, (uint8_t *)fbuf, sizeof(fbuf))) {
                printf("wtf\n");
                return 0;
        }
@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
                zap_copy_string(str, sp, mlen+1);
                *(str+mlen) = '\0';
                zap_clean_string(str);
-               printf("TYPE %d (%s) LEN %d VAL [%s]\n", type, zap_mdmf_type2str(type), mlen, str);
+               printf("TYPE %lu (%s) LEN %lu VAL [%s]\n", type, zap_mdmf_type2str(type), mlen, str);
        }
 
        zap_fsk_demod_destroy(&fsk_data);