]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
http: leverage 'bindaddr' for TLS in http.conf 42/3042/1
authorAlexander Traud <pabstraud@compuserve.com>
Mon, 20 Jun 2016 13:05:09 +0000 (15:05 +0200)
committerAlexander Traud <pabstraud@compuserve.com>
Mon, 20 Jun 2016 13:09:35 +0000 (08:09 -0500)
The internal HTTP/WebSocket server supports both TCP and TLS, which can be
activated separately via the file http.conf. The source code intends to re-use
the TCP parameter 'bindaddr' for TLS, even if 'tlsbindaddr' is not specified
explicitly. This did not work because of a typo. This change resolves this typo.

ASTERISK-26126 #close

Change-Id: I5efb0409ae12044dfb3495b6b97b6d40a8c9c51f

main/http.c

index 5133dfa94a1991daa02e2dbb0280d864c34f735b..c2bcbae49dd92cb7efa4503621759042c244c756 100644 (file)
@@ -1195,7 +1195,7 @@ static int __ast_http_load(int reload)
                 * the non-TLS bindaddress here.
                 */
                if (ast_sockaddr_isnull(&https_desc.local_address) && http_desc.accept_fd != -1) {
-                       ast_sockaddr_copy(&https_desc.local_address, &https_desc.local_address);
+                       ast_sockaddr_copy(&https_desc.local_address, &http_desc.local_address);
                        /* Of course, we can't use the same port though.
                         * Since no bind address was specified, we just use the
                         * default TLS port