[asterisk-commits] anthonyl: branch anthonyl/8509-manager-httcallback r48250 - /team/anthonyl/85...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Dec 4 17:58:00 MST 2006


Author: anthonyl
Date: Mon Dec  4 18:58:00 2006
New Revision: 48250

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48250
Log:
some logging to confirm my thoughts on the issue

Modified:
    team/anthonyl/8509-manager-httcallback/main/manager.c

Modified: team/anthonyl/8509-manager-httcallback/main/manager.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/8509-manager-httcallback/main/manager.c?view=diff&rev=48250&r1=48249&r2=48250
==============================================================================
--- team/anthonyl/8509-manager-httcallback/main/manager.c (original)
+++ team/anthonyl/8509-manager-httcallback/main/manager.c Mon Dec  4 18:58:00 2006
@@ -1926,7 +1926,8 @@
 
 	ast_copy_string(action, astman_get_header(m, "Action"), sizeof(action));
 	ast_log( LOG_DEBUG, "Manager received command '%s'\n", action );
-
+	ast_verbose("manager command '%s' \n", action); /* same as above for quick testing */
+	
 	if (ast_strlen_zero(action)) {
 		astman_send_error(s, m, "Missing action in request");
 		return 0;
@@ -1934,6 +1935,13 @@
 	if (!ast_strlen_zero(id)) {
 		snprintf(idText, sizeof(idText), "ActionID: %s\r\n", id);
 	}
+
+	/* it seems the problem in the issue is that we want to re-autencate
+	   but the mansession_id is still the same so. when we pass a login 
+	   message it's not processed in the below block of code
+	   
+	   and is just returned as a unknown command 
+	*/
 	if (!s->authenticated) {
 		if (!strcasecmp(action, "Challenge")) {
 			char *authtype;
@@ -1973,7 +1981,8 @@
 		} else
 			astman_send_error(s, m, "Authentication Required");
 	} else {
-		while (tmp) { 		
+		while (tmp) { 	
+			ast_verbose("your are  authencted so you are here\n");
 			if (!strcasecmp(action, tmp->action)) {
 				if ((s->writeperm & tmp->authority) == tmp->authority) {
 					if (tmp->func(s, m))
@@ -2414,8 +2423,11 @@
 			break;
 		}
 	}
+
+	ast_verbose("ident %x\n", ident); /* for quick testing remove me */
 	
 	if (!(s = find_session(ident))) {
+		ast_verbose("could not find a existing manager http session \n"); /* remove me */
 		/* Create new session */
 		if (!(s = ast_calloc(1, sizeof(*s)))) {
 			*status = 500;



More information about the asterisk-commits mailing list