diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-07-14 14:59:44 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-07-14 14:59:44 +0000 |
commit | 2d6cb5db6c8265a85dd6a1e3aa3e44a3cac11a33 (patch) | |
tree | 1fbcf3bbfe52bb875afe5332a676e20ef6ec4967 /channels/chan_iax2.c | |
parent | 30f3a00c827f5645ada2d110823205aaa6de9365 (diff) |
Merged revisions 206386 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r206386 | russell | 2009-07-14 09:51:44 -0500 (Tue, 14 Jul 2009) | 20 lines
Merged revisions 206385 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r206385 | russell | 2009-07-14 09:48:00 -0500 (Tue, 14 Jul 2009) | 13 lines
Merged revisions 206384 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r206384 | russell | 2009-07-14 09:45:47 -0500 (Tue, 14 Jul 2009) | 6 lines
Ensure apathetic replies are sent out on the proper socket.
chan_iax2 supports multiple address bindings. The send_apathetic_reply()
function did not attempt to send its response on the same socket that the
incoming message came in on.
........
................
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@206389 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r-- | channels/chan_iax2.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 81dddcd5a..e1c4edeae 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -3731,13 +3731,15 @@ struct parsed_dial_string { char *options; }; -static int send_apathetic_reply(unsigned short callno, unsigned short dcallno, struct sockaddr_in *sin, int command, int ts, unsigned char seqno) +static int send_apathetic_reply(unsigned short callno, unsigned short dcallno, + struct sockaddr_in *sin, int command, int ts, unsigned char seqno, + int sockfd) { struct ast_iax2_full_hdr f = { .scallno = htons(0x8000 | callno), .dcallno = htons(dcallno), .ts = htonl(ts), .iseqno = seqno, .oseqno = 0, .type = AST_FRAME_IAX, .csub = compress_subclass(command) }; - return sendto(defaultsockfd, &f, sizeof(f), 0, (struct sockaddr *)sin, sizeof(*sin)); + return sendto(sockfd, &f, sizeof(f), 0, (struct sockaddr *)sin, sizeof(*sin)); } /*! @@ -8519,7 +8521,7 @@ static int socket_process(struct iax2_thread *thread) /* Deal with POKE/PONG without allocating a callno */ if (f.frametype == AST_FRAME_IAX && f.subclass == IAX_COMMAND_POKE) { /* Reply back with a PONG, but don't care about the result. */ - send_apathetic_reply(1, ntohs(fh->scallno), &sin, IAX_COMMAND_PONG, ntohl(fh->ts), fh->iseqno + 1); + send_apathetic_reply(1, ntohs(fh->scallno), &sin, IAX_COMMAND_PONG, ntohl(fh->ts), fh->iseqno + 1, fd); return 1; } else if (f.frametype == AST_FRAME_IAX && f.subclass == IAX_COMMAND_ACK && dcallno == 1) { /* Ignore */ |