[asterisk-commits] mmichelson: branch 1.4 r162663 - /branches/1.4/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 10 10:24:56 CST 2008
Author: mmichelson
Date: Wed Dec 10 10:24:56 2008
New Revision: 162663
URL: http://svn.digium.com/view/asterisk?view=rev&rev=162663
Log:
Revert fix for issue 13570. It has caused more problems than
it helped to fix.
(closes issue #13783)
Reported by: navkumar
(closes issue #14025)
Reported by: ffs
Modified:
branches/1.4/channels/chan_sip.c
Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=162663&r1=162662&r2=162663
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Wed Dec 10 10:24:56 2008
@@ -166,8 +166,6 @@
#ifndef IPTOS_MINCOST
#define IPTOS_MINCOST 0x02
#endif
-
-#define SIP_RESERVED ";/?:@&=+$,# "
/* #define VOCAL_DATA_HACK */
@@ -4733,11 +4731,9 @@
struct sip_registry *reg;
int portnum = 0;
char username[256] = "";
- char *user;
char *hostname=NULL, *secret=NULL, *authuser=NULL;
char *porta=NULL;
char *contact=NULL;
- char *reserved = NULL;
if (!value)
return -1;
@@ -4757,16 +4753,6 @@
authuser = strchr(secret, ':');
if (authuser)
*authuser++ = '\0';
- }
- user = username;
- if ((reserved = strpbrk(user, SIP_RESERVED))) {
- goto invalid_char;
- }
- if (!ast_strlen_zero(secret) && (reserved = strpbrk(secret, SIP_RESERVED))) {
- goto invalid_char;
- }
- if (!ast_strlen_zero(authuser) && (reserved = strpbrk(authuser, SIP_RESERVED))) {
- goto invalid_char;
}
/* split host[:port][/contact] */
contact = strchr(hostname, '/');
@@ -4782,9 +4768,6 @@
ast_log(LOG_WARNING, "%s is not a valid port number at line %d\n", porta, lineno);
return -1;
}
- }
- if ((reserved = strpbrk(hostname, SIP_RESERVED))) {
- goto invalid_char;
}
if (!(reg = ast_calloc(1, sizeof(*reg)))) {
ast_log(LOG_ERROR, "Out of memory. Can't allocate SIP registry entry\n");
@@ -4817,10 +4800,6 @@
ASTOBJ_CONTAINER_LINK(®l, reg); /* Add the new registry entry to the list */
ASTOBJ_UNREF(reg,sip_registry_destroy);
return 0;
-
-invalid_char:
- ast_log(LOG_ERROR, "A reserved character ('%c') was used in a \"register\" line. This registration will not occur\n", *reserved);
- return -1;
}
/*! \brief Parse multiline SIP headers into one header
More information about the asterisk-commits
mailing list