[asterisk-commits] twilson: trunk r127545 - in /trunk: include/asterisk/http.h main/http.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 2 15:28:18 CDT 2008


Author: twilson
Date: Wed Jul  2 15:28:17 2008
New Revision: 127545

URL: http://svn.digium.com/view/asterisk?view=rev&rev=127545
Log:
Expose the prefix variable so that it can be used by modules depending on http support

Modified:
    trunk/include/asterisk/http.h
    trunk/main/http.c

Modified: trunk/include/asterisk/http.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/http.h?view=diff&rev=127545&r1=127544&r2=127545
==============================================================================
--- trunk/include/asterisk/http.h (original)
+++ trunk/include/asterisk/http.h Wed Jul  2 15:28:17 2008
@@ -105,4 +105,7 @@
 /*! \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 */

Modified: trunk/main/http.c
URL: http://svn.digium.com/view/asterisk/trunk/main/http.c?view=diff&rev=127545&r1=127544&r2=127545
==============================================================================
--- trunk/main/http.c (original)
+++ trunk/main/http.c Wed Jul  2 15:28:17 2008
@@ -141,6 +141,13 @@
 		return 0;
 	
 	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)




More information about the asterisk-commits mailing list