[svn-commits] bkruse: trunk r133770 - /trunk/main/manager.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jul 25 14:12:17 CDT 2008


Author: bkruse
Date: Fri Jul 25 14:12:17 2008
New Revision: 133770

URL: http://svn.digium.com/view/asterisk?view=rev&rev=133770
Log:
Revert tilghman and pari's code changes, as
we do NOT need to uri_decode in manager.
(if I sent core%20show%20channels from a telnet
session, it should be interpreted literally, however,
if I send that from an http session, it should be
decoded, which is the behaivor now)

Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=133770&r1=133769&r2=133770
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Fri Jul 25 14:12:17 2008
@@ -1270,8 +1270,7 @@
 {
 	int x;
 	char hdr[40];
-	const char *action, *cat, *match, *line, *tmp;
-	char *var, *value;
+	const char *action, *cat, *var, *value, *match, *line;
 	struct ast_category *category;
 	struct ast_variable *v;
 	struct ast_str *str1 = ast_str_create(16), *str2 = ast_str_create(16);
@@ -1287,23 +1286,10 @@
 		snprintf(hdr, sizeof(hdr), "Cat-%06d", x);
 		cat = astman_get_header(m, hdr);
 		snprintf(hdr, sizeof(hdr), "Var-%06d", x);
-		if ((tmp = astman_get_header(m, hdr))) {
-			ast_str_make_space(&str1, strlen(tmp) + 1);
-			strcpy(str1->str, tmp);
-			var = str1->str;
-			ast_uri_decode(var);
-		} else {
-			var = "";
-		}
+		var = astman_get_header(m, hdr);
 		snprintf(hdr, sizeof(hdr), "Value-%06d", x);
-		if ((tmp = astman_get_header(m, hdr))) {
-			ast_str_make_space(&str2, strlen(tmp) + 1);
-			strcpy(str2->str, tmp);
-			value = str2->str;
-			ast_uri_decode(value);
-		} else {
-			value = "";
-		}
+		value = astman_get_header(m, hdr);
+
 		if (!ast_strlen_zero(value) && *value == '>') {
 			object = 1;
 			value++;




More information about the svn-commits mailing list