[Freeswitch-svn] [commit] r7844 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN mikej at freeswitch.org
Fri Mar 7 23:26:02 EST 2008


Author: mikej
Date: Fri Mar  7 23:26:02 2008
New Revision: 7844

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c

Log:
Bitwise operation on logical result: ! has higher precedence than &. Use && or (!(x & y)) instead

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Fri Mar  7 23:26:02 2008
@@ -1986,7 +1986,7 @@
 	char *full_ref_by = NULL;
 	char *full_ref_to = NULL;
 
-	if (!profile->mflags & MFLAG_REFER) {
+	if (!(profile->mflags & MFLAG_REFER)) {
 		nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END());
 		goto done;
 	}

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	Fri Mar  7 23:26:02 2008
@@ -638,7 +638,7 @@
 	char key[128] = "";
 	switch_event_t *v_event = NULL;
 
-	if (!profile->mflags & MFLAG_REGISTER) {
+	if (!(profile->mflags & MFLAG_REGISTER)) {
 		nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END());
 		goto end;
 	}



More information about the Freeswitch-svn mailing list