Fix allow/disallow nomenclature (bug #2945, part deux)
authorMark Spencer <markster@digium.com>
Fri, 3 Dec 2004 23:46:09 +0000 (23:46 +0000)
committerMark Spencer <markster@digium.com>
Fri, 3 Dec 2004 23:46:09 +0000 (23:46 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4385 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c
frame.c
include/asterisk/frame.h

index dde707e..30b5c78 100755 (executable)
@@ -8292,9 +8292,9 @@ static struct sip_user *build_user(const char *name, struct ast_variable *v)
                                        user->amaflags = format;
                                }
                        } else if (!strcasecmp(v->name, "allow")) {
-                               ast_parse_allow_deny(&user->prefs, &user->capability, v->value, 1);
+                               ast_parse_allow_disallow(&user->prefs, &user->capability, v->value, 1);
                        } else if (!strcasecmp(v->name, "disallow")) {
-                               ast_parse_allow_deny(&user->prefs, &user->capability, v->value, 0);
+                               ast_parse_allow_disallow(&user->prefs, &user->capability, v->value, 0);
                        } else if (!strcasecmp(v->name, "insecure")) {
                                user->insecure = ast_true(v->value);
                        } else if (!strcasecmp(v->name, "callingpres")) {
@@ -8550,9 +8550,9 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, int
                        } else if (!strcasecmp(v->name, "pickupgroup")) {
                                peer->pickupgroup = ast_get_group(v->value);
                        } else if (!strcasecmp(v->name, "allow")) {
-                               ast_parse_allow_deny(&peer->prefs, &peer->capability, v->value, 1);
+                               ast_parse_allow_disallow(&peer->prefs, &peer->capability, v->value, 1);
                        } else if (!strcasecmp(v->name, "disallow")) {
-                               ast_parse_allow_deny(&peer->prefs, &peer->capability, v->value, 0);
+                               ast_parse_allow_disallow(&peer->prefs, &peer->capability, v->value, 0);
                        } else if (!strcasecmp(v->name, "insecure")) {
                                if (!strcasecmp(v->value, "very")) {
                                        peer->insecure = 2;
@@ -8826,9 +8826,9 @@ static int reload_config(void)
                        else
                                memcpy(&externip.sin_addr, hp->h_addr, sizeof(externip.sin_addr));
                } else if (!strcasecmp(v->name, "allow")) {
-                       ast_parse_allow_deny(&prefs, &global_capability, v->value, 1);
+                       ast_parse_allow_disallow(&prefs, &global_capability, v->value, 1);
                } else if (!strcasecmp(v->name, "disallow")) {
-                       ast_parse_allow_deny(&prefs, &global_capability, v->value, 0);
+                       ast_parse_allow_disallow(&prefs, &global_capability, v->value, 0);
                } else if (!strcasecmp(v->name, "register")) {
                        sip_register(v->value, v->lineno);
                } else if (!strcasecmp(v->name, "recordhistory")) {
diff --git a/frame.c b/frame.c
index 40bd9c2..7de4514 100755 (executable)
--- a/frame.c
+++ b/frame.c
@@ -3,9 +3,9 @@
  *
  * Frame manipulation routines
  * 
- * Copyright (C) 1999, Mark Spencer
+ * Copyright (C) 1999-2004, Digium, Inc.
  *
- * Mark Spencer <markster@linux-support.net>
+ * Mark Spencer <markster@digium.com>
  *
  * This program is free software, distributed under the terms of
  * the GNU General Public License
@@ -958,7 +958,7 @@ int ast_codec_choose(struct ast_codec_pref *pref, int formats, int find_best)
        return find_best ? ast_best_codec(formats) : 0;
 }
 
-void ast_parse_allow_deny(struct ast_codec_pref *pref, int *mask, char *list, int allowing) 
+void ast_parse_allow_disallow(struct ast_codec_pref *pref, int *mask, char *list, int allowing) 
 {
        int format_i = 0;
        char *next_format = NULL, *last_format = NULL;
index a612ea9..784bea3 100755 (executable)
@@ -3,9 +3,9 @@
  *
  * Asterisk internal frame definitions.
  * 
- * Copyright (C) 1999, Mark Spencer
+ * Copyright (C) 1999-2004, Digium, Inc.
  *
- * Mark Spencer <markster@linux-support.net>
+ * Mark Spencer <markster@digium.com>
  *
  * This program is free software, distributed under the terms of
  * the GNU Lesser General Public License.  Other components of
@@ -398,7 +398,7 @@ extern int ast_codec_pref_append(struct ast_codec_pref *pref, int format);
 extern int ast_codec_choose(struct ast_codec_pref *pref, int formats, int find_best);
 
 /* Parse an "allow" or "deny" line and update the mask and pref if provided */
-extern void ast_parse_allow_deny(struct ast_codec_pref *pref, int *mask, char *list, int allowing);
+extern void ast_parse_allow_disallow(struct ast_codec_pref *pref, int *mask, char *list, int allowing);
 
 /* Dump codec preference list into a string */
 extern int ast_codec_pref_string(struct ast_codec_pref *pref, char *buf, size_t size);