From 0c5608197585187fab53f5bec508e5f46b04b1c6 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 20 Jan 2015 20:20:35 -0500 Subject: [PATCH] FS-7499: copy port to where apr keeps it too --- src/switch_utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/switch_utils.c b/src/switch_utils.c index c9ae2090b6..bff05aeeb0 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -2002,11 +2002,15 @@ SWITCH_DECLARE(int) switch_cp_addr(switch_sockaddr_t *sa1, switch_sockaddr_t *sa if (ss1->sa_family != ss2->sa_family) return 0; - + + sa1->port = sa2->port; + sa1->family = sa2->family; + switch (ss1->sa_family) { case AF_INET: s1->sin_addr.s_addr = s2->sin_addr.s_addr; s1->sin_port = s2->sin_port; + return 1; case AF_INET6: if (s16->sin6_addr.s6_addr && s26->sin6_addr.s6_addr) {