From: Terry Wilson Date: Wed, 2 Jul 2008 20:28:17 +0000 (+0000) Subject: Expose the prefix variable so that it can be used by modules depending on http support X-Git-Tag: 1.6.2.0-beta1~1808 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a32369fcd546938667c28dcca7945cf84268c688;p=thirdparty%2Fasterisk.git Expose the prefix variable so that it can be used by modules depending on http support git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127545 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/include/asterisk/http.h b/include/asterisk/http.h index 72a1649971..1f46b1eed1 100644 --- a/include/asterisk/http.h +++ b/include/asterisk/http.h @@ -105,4 +105,7 @@ void ast_http_uri_unlink_all_with_key(const char *key); /*! \brief Return an ast_str malloc()'d string containing an HTTP error message */ struct ast_str *ast_http_error(int status, const char *title, const char *extra_header, const char *text); +/*! \brief Return the current prefix */ +void ast_http_prefix(char *buf, int len); + #endif /* _ASTERISK_SRV_H */ diff --git a/main/http.c b/main/http.c index 33818af2c3..3e6f9d0f6e 100644 --- a/main/http.c +++ b/main/http.c @@ -143,6 +143,13 @@ static uint32_t manid_from_vars(struct ast_variable *sid) { return mngid; } +void ast_http_prefix(char *buf, int len) +{ + if (buf) { + ast_copy_string(buf, prefix, len); + } +} + static struct ast_str *static_callback(struct ast_tcptls_session_instance *ser, const struct ast_http_uri *urih, const char *uri, enum ast_http_method method, struct ast_variable *vars, struct ast_variable *headers, int *status, char **title, int *contentlength) { char *path;