diff options
-rw-r--r-- | channels/sip/reqresp_parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/sip/reqresp_parser.c b/channels/sip/reqresp_parser.c index e5c1ff2bc..31832a33a 100644 --- a/channels/sip/reqresp_parser.c +++ b/channels/sip/reqresp_parser.c @@ -2420,7 +2420,7 @@ struct sip_via *parse_via(const char *header) /* store the port, we have to handle ipv6 addresses containing ':' * characters gracefully */ - if (((parm = strchr(v->sent_by, ']')) && *(++parm) == ':') || (parm = strchr(v->sent_by, ':'))) { + if (((parm = strchr(v->sent_by, ']')) && *(++parm) == ':') || (!(parm = strchr(v->sent_by, ']')) && (parm = strchr(v->sent_by, ':')))) { char *endptr; v->port = strtol(++parm, &endptr, 10); |