FreeCalypso > hg > themwi-system-sw
diff sip-manual-out/main.c @ 123:a36b731bfef9
sip-manual-out: implement sending BYE and CANCEL
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 29 Sep 2022 17:21:11 -0800 |
parents | 07e4cc5f824c |
children | 258932879f8b |
line wrap: on
line diff
--- a/sip-manual-out/main.c Thu Sep 29 15:03:12 2022 -0800 +++ b/sip-manual-out/main.c Thu Sep 29 17:21:11 2022 -0800 @@ -40,7 +40,7 @@ msg_size_err: fprintf(stderr, "composing INVITE req: msg size error\n"); exit(1); } - rc = add_req_boilerplate(&msg, "1 INVITE"); + rc = add_req_boilerplate(&msg, "1 INVITE", 0); if (rc < 0) goto msg_size_err; rc = add_contact_header(&msg); @@ -140,6 +140,7 @@ /* main select loop */ for (;;) { FD_ZERO(&fds); + FD_SET(0, &fds); FD_SET(sip_socket, &fds); rc = select(sip_socket+1, &fds, 0, 0, 0); if (rc < 0) { @@ -149,6 +150,8 @@ exit(1); } gettimeofday(&cur_event_time, 0); + if (FD_ISSET(0, &fds)) + select_stdin(); if (FD_ISSET(sip_socket, &fds)) sip_socket_select(); }