[asterisk-commits] russell: branch 1.2 r59916 - /branches/1.2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Apr 3 11:43:54 MST 2007


Author: russell
Date: Tue Apr  3 13:43:54 2007
New Revision: 59916

URL: http://svn.digium.com/view/asterisk?view=rev&rev=59916
Log:
Make chan_sip report when it encounters an unknown option.
(issue #9440, reported by nightcrawler)

Modified:
    branches/1.2/channels/chan_sip.c

Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?view=diff&rev=59916&r1=59915&r2=59916
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Tue Apr  3 13:43:54 2007
@@ -12343,10 +12343,8 @@
 			user->callingpres = ast_parse_caller_presentation(v->value);
 			if (user->callingpres == -1)
 				user->callingpres = atoi(v->value);
-		}
-		/*else if (strcasecmp(v->name,"type"))
-		 *	ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
-		 */
+		} else if (strcasecmp(v->name, "type"))
+			ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno);
 		v = v->next;
 	}
 	ast_copy_flags(user, &userflags, mask.flags);
@@ -12629,11 +12627,9 @@
 				ast_log(LOG_WARNING, "Qualification of peer '%s' should be 'yes', 'no', or a number of milliseconds at line %d of sip.conf\n", peer->name, v->lineno);
 				peer->maxms = 0;
 			}
-		}
-		/* else if (strcasecmp(v->name,"type"))
-		 *	ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
-		 */
-		v=v->next;
+		} else if (strcasecmp(v->name, "type"))
+			ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno);
+		v = v->next;
 	}
 	if (!ast_test_flag((&global_flags_page2), SIP_PAGE2_IGNOREREGEXPIRE) && ast_test_flag(&peer->flags_page2, SIP_PAGE2_DYNAMIC) && realtime) {
 		time_t nowtime;
@@ -12928,10 +12924,8 @@
 			}
 		} else if (!strcasecmp(v->name, "callevents")) {
 			callevents = ast_true(v->value);
-		}
-		/* else if (strcasecmp(v->name,"type"))
-		 *	ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
-		 */
+		} else
+			ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno);
 		 v = v->next;
 	}
 
@@ -12946,7 +12940,8 @@
  		/* Format for authentication is auth = username:password at realm */
  		if (!strcasecmp(v->name, "auth")) {
  			authl = add_realm_authentication(authl, v->value, v->lineno);
- 		}
+ 		} else
+			ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno);
  		v = v->next;
  	}
 	



More information about the asterisk-commits mailing list