[Asterisk-cvs] asterisk/channels chan_sip.c,1.659,1.660
markster at lists.digium.com
markster at lists.digium.com
Mon Feb 14 13:47:15 CST 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv7351/channels
Modified Files:
chan_sip.c
Log Message:
Merge OSP udpates
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.659
retrieving revision 1.660
diff -u -d -r1.659 -r1.660
--- chan_sip.c 13 Feb 2005 22:40:41 -0000 1.659
+++ chan_sip.c 14 Feb 2005 19:46:45 -0000 1.660
@@ -164,7 +164,7 @@
static int apeerobjs = 0;
static int regobjs = 0;
-static int global_allowguest = 0; /* allow unauthenticated users/peers to connect? */
+static int global_allowguest = 1; /* allow unauthenticated users/peers to connect? */
#define DEFAULT_MWITIME 10
static int global_mwitime = DEFAULT_MWITIME; /* Time between MWI checks for peers */
@@ -5000,6 +5000,7 @@
if (ast_strlen_zero(secret) && ast_strlen_zero(md5secret)
#ifdef OSP_SUPPORT
&& ast_test_flag(p, SIP_OSPAUTH)
+ && global_allowguest != 2
#endif
)
return 0;
@@ -8978,6 +8979,16 @@
ast_set_flag(flags, SIP_PROG_INBAND_NO);
else if (ast_true(v->value))
ast_set_flag(flags, SIP_PROG_INBAND_YES);
+ } else if (!strcasecmp(v->name, "allowguest")) {
+#ifdef OSP_SUPPORT
+ if(!strcasecmp(v->value, "osp"))
+ global_allowguest = 2;
+ else
+#endif
+ if (ast_true(v->value))
+ global_allowguest = 1;
+ else
+ global_allowguest = 0;
#ifdef OSP_SUPPORT
} else if (!strcasecmp(v->name, "ospauth")) {
ast_set_flag(mask, SIP_OSPAUTH);
More information about the svn-commits
mailing list