Wait for command to complete (bug #1733) and take RTP 19 as CN too...
authorMark Spencer <markster@digium.com>
Sat, 7 Aug 2004 14:22:09 +0000 (14:22 +0000)
committerMark Spencer <markster@digium.com>
Sat, 7 Aug 2004 14:22:09 +0000 (14:22 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3590 65c4cc65-6c06-0410-ace0-fbb531ad65f3

asterisk.c
rtp.c

index 3e39c7c..2f8df12 100755 (executable)
@@ -1413,7 +1413,13 @@ static void ast_remotecontrol(char * data)
 #endif 
        if (option_exec && data) {  /* hack to print output then exit if asterisk -rx is used */
                char tempchar;
-               ast_el_read_char(el, &tempchar);
+               struct pollfd fds[0];
+               fds[0].fd = ast_consock;
+               fds[0].events = POLLIN;
+               fds[0].revents = 0;
+               while(poll(fds, 1, 100) > 0) {
+                       ast_el_read_char(el, &tempchar);
+               }
                return;
        }
        for(;;) {
diff --git a/rtp.c b/rtp.c
index 518817d..476a9c8 100755 (executable)
--- a/rtp.c
+++ b/rtp.c
@@ -616,6 +616,7 @@ static struct rtpPayloadType static_RTP_PT[MAX_RTP_PT] = {
   [16] = {1, AST_FORMAT_ADPCM}, /* 11.025 kHz */
   [17] = {1, AST_FORMAT_ADPCM}, /* 22.050 kHz */
   [18] = {1, AST_FORMAT_G729A},
+  [19] = {0, AST_RTP_CN},              /* Also used for CN */
   [26] = {1, AST_FORMAT_JPEG},
   [31] = {1, AST_FORMAT_H261},
   [34] = {1, AST_FORMAT_H263},