FreeCalypso > hg > themwi-interim
diff mtctest/main.c @ 14:44c1d4d787e9 default tip
themwi-test-mtc: add option to set bearer cap
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 28 Nov 2024 20:37:23 +0000 |
parents | 395c56969bc4 |
children |
line wrap: on
line diff
--- a/mtctest/main.c Tue Oct 29 00:06:28 2024 +0000 +++ b/mtctest/main.c Thu Nov 28 20:37:23 2024 +0000 @@ -25,17 +25,27 @@ { extern int optind; extern char *optarg; - char *from; + char *from, *bc_extra; + int include_bc; fd_set fds; struct timeval next_rtp_out, timeout; int c, max_fd, rtp_out_running; from = 0; - while ((c = getopt(argc, argv, "f:")) != EOF) { + include_bc = 0; + bc_extra = 0; + while ((c = getopt(argc, argv, "f:sS:")) != EOF) { switch (c) { case 'f': from = optarg; continue; + case 's': + include_bc = 1; + continue; + case 'S': + include_bc = 1; + bc_extra = optarg; + continue; default: usage: fprintf(stderr, @@ -48,6 +58,8 @@ goto usage; openlog("themwi-test-mtc", 0, LOG_LOCAL5); init_setup_msg(from, argv[optind]); + if (include_bc) + set_bearer_cap(bc_extra); obtain_rtp_endp(); connect_mtc_socket(); send_setup_msg();