[asterisk-commits] tilghman: branch group/manager_http_auth r188581 - in /team/group/manager_htt...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 15 12:23:07 CDT 2009


Author: tilghman
Date: Wed Apr 15 12:23:03 2009
New Revision: 188581

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=188581
Log:
Just spacing issues on new lines

Modified:
    team/group/manager_http_auth/main/http.c
    team/group/manager_http_auth/main/manager.c
    team/group/manager_http_auth/res/res_http_post.c

Modified: team/group/manager_http_auth/main/http.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/manager_http_auth/main/http.c?view=diff&rev=188581&r1=188580&r2=188581
==============================================================================
--- team/group/manager_http_auth/main/http.c (original)
+++ team/group/manager_http_auth/main/http.c Wed Apr 15 12:23:03 2009
@@ -17,14 +17,14 @@
  */
 
 /*!
- * \file 
+ * \file
  * \brief http server for AMI access
  *
  * \author Mark Spencer <markster at digium.com>
  *
  * This program implements a tiny http server
- * and was inspired by micro-httpd by Jef Poskanzer 
- * 
+ * and was inspired by micro-httpd by Jef Poskanzer
+ *
  * \ref AstHTTP - AMI over the http protocol
  */
 
@@ -94,8 +94,8 @@
 
 /*! \brief Limit the kinds of files we're willing to serve up */
 static struct {
-	char *ext;
-	char *mtype;
+	const char *ext;
+	const char *mtype;
 } mimetypes[] = {
 	{ "png", "image/png" },
 	{ "xml", "text/xml" },
@@ -151,7 +151,7 @@
 uint32_t manid_from_vars(struct ast_variable *headers) {
 	uint32_t mngid = 0;
 	struct ast_variable *v, *cookies;
-	
+
 	cookies = ast_http_get_cookies(headers);
 	for (v = cookies; v; v = v->next) {
 		if (!strcasecmp(v->name, "mansession_id")) {
@@ -193,7 +193,7 @@
 		return -1;
 	}
 
-	/* Yuck.  I'm not really sold on this, but if you don't deliver static content it makes your configuration 
+	/* Yuck.  I'm not really sold on this, but if you don't deliver static content it makes your configuration
 	   substantially more challenging, but this seems like a rather irritating feature creep on Asterisk. */
 	if (!enablestatic || ast_strlen_zero(uri)) {
 		goto out403;
@@ -628,7 +628,7 @@
 	return post_vars;
 }
 
-static int handle_uri(struct ast_tcptls_session_instance *ser, char *uri, enum ast_http_method method, 
+static int handle_uri(struct ast_tcptls_session_instance *ser, char *uri, enum ast_http_method method,
 	struct ast_variable *headers)
 {
 	char *c;
@@ -690,7 +690,7 @@
 			l = strlen(urih->uri);
 			c = uri + l;	/* candidate */
 			if (strncasecmp(urih->uri, uri, l) /* no match */
-			    || (*c && *c != '/')) { /* substring */ 
+			    || (*c && *c != '/')) { /* substring */
 				continue;
 			}
 			if (*c == '/') {
@@ -941,7 +941,7 @@
 	AST_RWLIST_WRLOCK(&uri_redirects);
 
 	target_len--; /* So we can compare directly with strlen() */
-	if ( AST_RWLIST_EMPTY(&uri_redirects) 
+	if (AST_RWLIST_EMPTY(&uri_redirects)
 		|| strlen(AST_RWLIST_FIRST(&uri_redirects)->target) <= target_len ) {
 		AST_RWLIST_INSERT_HEAD(&uri_redirects, redirect, entry);
 		AST_RWLIST_UNLOCK(&uri_redirects);
@@ -950,10 +950,10 @@
 	}
 
 	AST_RWLIST_TRAVERSE(&uri_redirects, cur, entry) {
-		if ( AST_RWLIST_NEXT(cur, entry) 
+		if (AST_RWLIST_NEXT(cur, entry)
 			&& strlen(AST_RWLIST_NEXT(cur, entry)->target) <= target_len ) {
 			AST_RWLIST_INSERT_AFTER(&uri_redirects, cur, redirect, entry);
-			AST_RWLIST_UNLOCK(&uri_redirects); 
+			AST_RWLIST_UNLOCK(&uri_redirects);
 			return;
 		}
 	}
@@ -1079,14 +1079,14 @@
 	switch (cmd) {
 	case CLI_INIT:
 		e->command = "http show status";
-		e->usage = 
+		e->usage =
 			"Usage: http show status\n"
 			"       Lists status of internal HTTP engine\n";
 		return NULL;
 	case CLI_GENERATE:
 		return NULL;
 	}
-	
+
 	if (a->argc != 3) {
 		return CLI_SHOWUSAGE;
 	}

Modified: team/group/manager_http_auth/main/manager.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/manager_http_auth/main/manager.c?view=diff&rev=188581&r1=188580&r2=188581
==============================================================================
--- team/group/manager_http_auth/main/manager.c (original)
+++ team/group/manager_http_auth/main/manager.c Wed Apr 15 12:23:03 2009
@@ -2593,7 +2593,7 @@
 			if (!ast_strlen_zero(id))
 				snprintf(fast->idtext, sizeof(fast->idtext), "ActionID: %s", id);
 			ast_copy_string(fast->tech, tech, sizeof(fast->tech));
-   			ast_copy_string(fast->data, data, sizeof(fast->data));
+			ast_copy_string(fast->data, data, sizeof(fast->data));
 			ast_copy_string(fast->app, app, sizeof(fast->app));
 			ast_copy_string(fast->appdata, appdata, sizeof(fast->appdata));
 			if (l) {

Modified: team/group/manager_http_auth/res/res_http_post.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/manager_http_auth/res/res_http_post.c?view=diff&rev=188581&r1=188580&r2=188581
==============================================================================
--- team/group/manager_http_auth/res/res_http_post.c (original)
+++ team/group/manager_http_auth/res/res_http_post.c Wed Apr 15 12:23:03 2009
@@ -306,7 +306,7 @@
 		ast_http_error(ser, 501, "Not Implemented", "Attempt to use unimplemented / unsupported method");
 		return -1;
 	}
-	
+
 	if (!astman_is_authed(manid_from_vars(headers))) {
 		ast_http_error(ser, 403, "Access Denied", "Sorry, I cannot let you do that, Dave.");
 		return -1;
@@ -316,7 +316,7 @@
 		ast_http_error(ser, 400, "Missing URI handle", "There was an error parsing the request");
 	        return -1;
 	}
-	
+
 	cookies = ast_http_get_cookies(headers);
 	for (var = cookies; var; var = var->next) {
 		if (!strcasecmp(var->name, "mansession_id")) {
@@ -369,7 +369,7 @@
 			ast_log(LOG_DEBUG, "Cannot find boundary marker in POST request.\n");
 		}
 		fclose(f);
-		
+
 		return -1;
 	}
 
@@ -397,7 +397,7 @@
 		ast_http_error(ser, 400, "Bad Request", "The was an error parsing the request.");
 		return -1;
 	}
-	g_object_unref(message);	
+	g_object_unref(message);
 
 	ast_http_error(ser, 200, "OK", "File successfully uploaded.");
 	return 0;




More information about the asterisk-commits mailing list