Fix a regression in TCP support.
authorRussell Bryant <russell@russellbryant.com>
Wed, 21 Jan 2009 10:26:07 +0000 (10:26 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 21 Jan 2009 10:26:07 +0000 (10:26 +0000)
This patch fixes a problem that caused chan_sip to think that every open TCP session
was to a remote address of 0.0.0.0:0.

(closes issue #14287)
Reported by: jamesgolovich
Patches:
      bug-14287.diff.txt uploaded by jamesgolovich (license 176)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169620 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/tcptls.c

index 4c01f22..6aa0db8 100644 (file)
@@ -383,7 +383,7 @@ struct ast_tcptls_session_instance *ast_tcptls_client_start(struct ast_tcptls_se
        tcptls_session->fd = desc->accept_fd;
        tcptls_session->parent = desc;
        tcptls_session->parent->worker_fn = NULL;
-       memcpy(&tcptls_session->remote_address, &desc->local_address, sizeof(tcptls_session->remote_address));
+       memcpy(&tcptls_session->remote_address, &desc->remote_address, sizeof(tcptls_session->remote_address));
 
        tcptls_session->client = 1;