summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWalter Doekes <walter+asterisk@wjd.nu>2011-11-01 21:02:56 +0000
committerWalter Doekes <walter+asterisk@wjd.nu>2011-11-01 21:02:56 +0000
commitb41b49ea0e0ebdb7250f9d560b13f6fa21456694 (patch)
tree7bc973c1dc9f6e499c92491895b3a6d55ba825dd /include
parent25ee5f83b5c9e77be328a92b430d911396f1ac29 (diff)
Several fixes to the chan_sip dynamic realtime peer/user lookup
There were several problems with the dynamic realtime peer/user lookup code. The lookup logic had become rather hard to read due to lots of incremental changes to the realtime_peer function. And, during the addition of the sipregs functionality, several possibilities for memory leaks had been introduced. The insecure=port matching has always been broken for anyone using the sipregs family. And, related, the broken implementation forced those using sipregs to *still* have an ipaddr column on their sippeers table. Thanks Terry Wilson for comprehensive testing and finding and fixing unexpected behaviour from the multientry realtime call which caused the realtime_peer to have a completely unused code path. This changeset fixes the leaks, the lookup inconsistenties and that you won't need an ipaddr column on your sippeers table anymore (when you're using sipregs). Beware that when you're using sipregs, peers with insecure=port will now start matching! (closes issue ASTERISK-17792) (closes issue ASTERISK-18356) Reported by: marcelloceschia, Walter Doekes Reviewed by: Terry Wilson Review: https://reviewboard.asterisk.org/r/1395 ........ Merged revisions 342927 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 342929 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/config.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asterisk/config.h b/include/asterisk/config.h
index 932404d14..86c2bb5dd 100644
--- a/include/asterisk/config.h
+++ b/include/asterisk/config.h
@@ -450,6 +450,17 @@ int ast_check_realtime(const char *family);
int ast_realtime_enabled(void);
/*!
+ * \brief Duplicate variable list
+ * \param var the linked list of variables to clone
+ * \return A duplicated list which you'll need to free with
+ * ast_variables_destroy or NULL when out of memory.
+ *
+ * \note Do not depend on this to copy more than just name, value and filename
+ * (the arguments to ast_variables_new).
+ */
+struct ast_variable *ast_variables_dup(struct ast_variable *var);
+
+/*!
* \brief Free variable list
* \param var the linked list of variables to free
*