summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-06-08 21:08:17 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-06-08 21:08:17 +0000
commit745484e1b3dbf758e602aa642474822c4f1eaccb (patch)
tree5ef2f990af200c21029dd7acb4b189855c52945f /include/asterisk
parent8b2412db289b43202ef33053fb4efc4481d99bd4 (diff)
Fix error paths in action_hangup() for AMI Hangup action.
* Check allocation function return values for failure. Crashing is bad. * Tweak ast_regex_string_to_regex_pattern() parameters for proper ast_str usage. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/strings.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h
index e3ff4c4fe..7a7772294 100644
--- a/include/asterisk/strings.h
+++ b/include/asterisk/strings.h
@@ -253,19 +253,19 @@ int ast_build_string(char **buffer, size_t *space, const char *fmt, ...) __attri
int ast_build_string_va(char **buffer, size_t *space, const char *fmt, va_list ap) __attribute__((format(printf, 3, 0)));
/*!
- \brief Given a string regex_string in the form of "/regex/", convert it into the form of "regex"
-
- This function will trim one leading / and one trailing / from a given input string
- ast_str regex_pattern must be preallocated before calling this function
-
- \return 0 on success, non-zero on failure.
- \return 1 if we only stripped a leading /
- \return 2 if we only stripped a trailing /
- \return 3 if we did not strip any / characters
- \param regex_string the string containing /regex/
- \param regex_pattern the destination ast_str which will contain "regex" after execution
-*/
-int ast_regex_string_to_regex_pattern(const char *regex_string, struct ast_str *regex_pattern);
+ * \brief Given a string regex_string in the form of "/regex/", convert it into the form of "regex"
+ *
+ * This function will trim one leading / and one trailing / from a given input string
+ * ast_str regex_pattern must be preallocated before calling this function
+ *
+ * \return 0 on success, non-zero on failure.
+ * \return 1 if we only stripped a leading /
+ * \return 2 if we only stripped a trailing /
+ * \return 3 if we did not strip any / characters
+ * \param regex_string the string containing /regex/
+ * \param regex_pattern the destination ast_str which will contain "regex" after execution
+ */
+int ast_regex_string_to_regex_pattern(const char *regex_string, struct ast_str **regex_pattern);
/*!
* \brief Make sure something is true.