[asterisk-commits] oej: trunk r51932 - in /trunk:
include/asterisk/http.h main/http.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Jan 24 02:31:27 MST 2007
Author: oej
Date: Wed Jan 24 03:31:26 2007
New Revision: 51932
URL: http://svn.digium.com/view/asterisk?view=rev&rev=51932
Log:
Doxygen updates
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=51932&r1=51931&r2=51932
==============================================================================
--- trunk/include/asterisk/http.h (original)
+++ trunk/include/asterisk/http.h Wed Jan 24 03:31:26 2007
@@ -22,15 +22,14 @@
#include "asterisk/config.h"
/*!
- \file http.h
- \brief Support for Private Asterisk HTTP Servers.
- \note Note: The Asterisk HTTP servers are extremely simple and minimal and
- only support the "GET" method.
- \author Mark Spencer <markster at digium.com>
-*/
-
-/*!
- * In order to have TLS/SSL support, we need the openssl libraries.
+ * \file http.h
+ * \brief Support for Private Asterisk HTTP Servers.
+ * \note Note: The Asterisk HTTP servers are extremely simple and minimal and
+ * only support the "GET" method.
+ *
+ * \author Mark Spencer <markster at digium.com>
+ *
+ * \note In order to have TLS/SSL support, we need the openssl libraries.
* Still we can decide whether or not to use them by commenting
* in or out the DO_SSL macro.
* TLS/SSL support is basically implemented by reading from a config file
@@ -42,11 +41,10 @@
* on the socket, to do the necessary setup. At the moment the context's name
* is hardwired in the function, but we can certainly make it into an extra
* parameter to the function.
- *
* We declare most of ssl support variables unconditionally,
* because their number is small and this simplifies the code.
*
- * NOTE: the ssl-support variables (ssl_ctx, do_ssl, certfile, cipher)
+ * \note: the ssl-support variables (ssl_ctx, do_ssl, certfile, cipher)
* and their setup should be moved to a more central place, e.g. asterisk.conf
* and the source files that processes it. Similarly, ssl_setup() should
* be run earlier in the startup process so modules have it available.
@@ -65,7 +63,7 @@
typedef struct {} SSL_CTX;
#endif /* DO_SSL */
-/* SSL support */
+/*! SSL support */
#define AST_CERTFILE "asterisk.pem"
struct tls_config {
@@ -137,13 +135,16 @@
void server_start(struct server_args *desc);
int ssl_setup(struct tls_config *cfg);
-/*! \brief HTTP Callbacks take the socket, the method and the path as arguments and should
+/*! \brief HTTP Callbacks take the socket
+
+ \note The method and the path as arguments and should
return the content, allocated with malloc(). Status should be changed to reflect
the status of the request if it isn't 200 and title may be set to a malloc()'d string
to an appropriate title for non-200 responses. Content length may also be specified.
The return value may include additional headers at the front and MUST include a blank
line with \r\n to provide separation between user headers and content (even if no
- content is specified) */
+ content is specified)
+*/
typedef struct ast_str *(*ast_http_callback)(struct sockaddr_in *requestor, const char *uri, struct ast_variable *params, int *status, char **title, int *contentlength);
struct ast_http_uri {
Modified: trunk/main/http.c
URL: http://svn.digium.com/view/asterisk/trunk/main/http.c?view=diff&rev=51932&r1=51931&r2=51932
==============================================================================
--- trunk/main/http.c (original)
+++ trunk/main/http.c Wed Jan 24 03:31:26 2007
@@ -58,24 +58,7 @@
#define MAX_PREFIX 80
#define DEFAULT_PREFIX "/asterisk"
-/*!
- * In order to have TLS/SSL support, we need the openssl libraries.
- * Still we can decide whether or not to use them by commenting
- * in or out the DO_SSL macro.
- * TLS/SSL support is basically implemented by reading from a config file
- * (currently http.conf) the names of the certificate and cipher to use,
- * and then run ssl_setup() to create an appropriate SSL_CTX (ssl_ctx)
- * If we support multiple domains, presumably we need to read multiple
- * certificates.
- * When we are requested to open a TLS socket, we run make_file_from_fd()
- * on the socket, to do the necessary setup. At the moment the context's name
- * is hardwired in the function, but we can certainly make it into an extra
- * parameter to the function.
- *
- * We declare most of ssl support variables unconditionally,
- * because their number is small and this simplifies the code.
- */
-
+/* See http.h for more information about the SSL implementation */
#if defined(HAVE_OPENSSL) && (defined(HAVE_FUNOPEN) || defined(HAVE_FOPENCOOKIE))
#define DO_SSL /* comment in/out if you want to support ssl */
#endif
@@ -157,6 +140,7 @@
}
return buf;
}
+
static struct ast_str *static_callback(struct sockaddr_in *req, const char *uri, struct ast_variable *vars, int *status, char **title, int *contentlength)
{
struct ast_str *result;
@@ -298,7 +282,9 @@
}
/*! \brief
- * Link the new uri into the list. They are sorted by length of
+ * Link the new uri into the list.
+ *
+ * They are sorted by length of
* the string, not alphabetically. Duplicate entries are not replaced,
* but the insertion order (using <= and not just <) makes sure that
* more recent insertions hide older ones.
More information about the asterisk-commits
mailing list