From 6cbe57b730b5e40d28d68e82de70528e2cf79ec0 Mon Sep 17 00:00:00 2001 From: David Vossel Date: Tue, 16 Jun 2009 22:31:42 +0000 Subject: [PATCH] Merged revisions 201223 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r201223 | dvossel | 2009-06-16 17:29:30 -0500 (Tue, 16 Jun 2009) | 2 lines fix issue with build_contact introduced by the "SIP trasnport type issues" commit ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@201226 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 25e01bab4f..eb6383ef25 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -8949,14 +8949,14 @@ static void build_contact(struct sip_pvt *p) /* only add port if it's non-standard for the transport type */ if (!sip_standard_port(p->socket.type, ourport)) { if (p->socket.type == SIP_TRANSPORT_UDP) - ast_string_field_build(p, our_contact, "", p->exten, S_OR(p->exten, "@"), ast_inet_ntoa(p->ourip.sin_addr), ourport); + ast_string_field_build(p, our_contact, "", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(p->ourip.sin_addr), ourport); else - ast_string_field_build(p, our_contact, "", p->exten, S_OR(p->exten, "@"), ast_inet_ntoa(p->ourip.sin_addr), ourport, get_transport(p->socket.type)); + ast_string_field_build(p, our_contact, "", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(p->ourip.sin_addr), ourport, get_transport(p->socket.type)); } else { if (p->socket.type == SIP_TRANSPORT_UDP) - ast_string_field_build(p, our_contact, "", p->exten, S_OR(p->exten, "@"), ast_inet_ntoa(p->ourip.sin_addr)); + ast_string_field_build(p, our_contact, "", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(p->ourip.sin_addr)); else - ast_string_field_build(p, our_contact, "", p->exten, S_OR(p->exten, "@"), ast_inet_ntoa(p->ourip.sin_addr), get_transport(p->socket.type)); + ast_string_field_build(p, our_contact, "", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(p->ourip.sin_addr), get_transport(p->socket.type)); } }