aboutsummaryrefslogtreecommitdiffstats
path: root/main/config.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-03 20:25:22 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-03 20:25:22 +0000
commit0113b9d39cadd868cc9376ff2bf0927fd92da685 (patch)
treef785e5a7286268929f83d6316af377dbd7c39036 /main/config.c
parent3ec830c1f7e3d0db97d1bf1e0652972ee75b2a4c (diff)
Changed the behavior of sip's realtime_peer function to match the corresponding way of matching for non-realtime peers.
Now matches are made on both the IP address and port number, or if the insecure setting is set to "port" then just match on the IP address. In order to accomplish this, I also added a new API call, ast_category_root, which returns the first variable of an ast_category struct git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78103 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/config.c')
-rw-r--r--main/config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main/config.c b/main/config.c
index 172b97de1..bea1cfc1e 100644
--- a/main/config.c
+++ b/main/config.c
@@ -353,6 +353,14 @@ static struct ast_category *next_available_category(struct ast_category *cat)
return cat;
}
+struct ast_variable *ast_category_root(struct ast_config *config, char *cat)
+{
+ struct ast_category *category = ast_category_get(config, cat);
+ if (category)
+ return category->root;
+ return NULL;
+}
+
char *ast_category_browse(struct ast_config *config, const char *prev)
{
struct ast_category *cat = NULL;