summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2007-08-06 16:54:51 +0000
committerMark Michelson <mmichelson@digium.com>2007-08-06 16:54:51 +0000
commitc4c0e45c8ba906383b5798765ee82f922dfadb9c (patch)
tree9103c0da5b6df10e83944c78545e011aca7e347a /main
parent6af571e79a11a55f090f4cb5e168dc1ef4c803b8 (diff)
Merged revisions 78103 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r78103 | mmichelson | 2007-08-03 15:25:22 -0500 (Fri, 03 Aug 2007) | 7 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@78186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main/config.c b/main/config.c
index 7c9106cc3..01c9c9a0c 100644
--- a/main/config.c
+++ b/main/config.c
@@ -356,6 +356,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;