Selaa lähdekoodia

commit lost files -- fix result type

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@8473 8c9fc860-2736-0410-a75d-ab315db34111
eth.metacore 6 vuotta sitten
vanhempi
commit
91fe72fd1c
2 muutettua tiedostoa jossa 8 lisäystä ja 6 poistoa
  1. 4 3
      source/WebFTPServer.Mod
  2. 4 3
      source/WebHTTPServer.Mod

+ 4 - 3
source/WebFTPServer.Mod

@@ -87,7 +87,8 @@ TYPE
 		ip: IP.Adr;
 		method: ARRAY 16 OF CHAR;
 		uri: ARRAY 1024 OF CHAR;
-		status, result: LONGINT;
+		status: LONGINT;
+		result: WORD;
 		pending: BOOLEAN;
 	END;
 
@@ -196,7 +197,7 @@ TYPE
 
 		PROCEDURE Directory(name: ARRAY OF CHAR; full: BOOLEAN);
 		VAR data: TCP.Connection; w: Streams.Writer; e: Files.Enumerator; t: Kernel.MilliTimer;
-			prefix: Files.Prefix; str: ARRAY 20 OF CHAR; date, res, size, time: LONGINT; flags: SET; c: CHAR;
+			prefix: Files.Prefix; str: ARRAY 20 OF CHAR; date, size, time: LONGINT; res: WORD; flags: SET; c: CHAR;
 			split: BOOLEAN;
 		BEGIN
 			SendMessage(150, "Opening ASCII mode data connection for file list.");
@@ -382,7 +383,7 @@ TYPE
 		PROCEDURE Execute(VAR cmd, param: ARRAY OF CHAR);
 		VAR
 			tmp, filename, str: ARRAY dirLen OF CHAR;
-			i, code, lastState, res: LONGINT;
+			i, code, lastState: LONGINT; res: WORD;
 
 		BEGIN
 			lastState := state; state := Ok;

+ 4 - 3
source/WebHTTPServer.Mod

@@ -300,7 +300,8 @@ TYPE
 
 	HTTPAgent = OBJECT (TCPServices.Agent)
 	VAR
-		res, len : LONGINT;
+		res: WORD;
+		len : LONGINT;
 		body, closeRequested: BOOLEAN;
 		out: Streams.Writer; in, inR: Streams.Reader;
 		o : ANY;
@@ -373,7 +374,7 @@ TYPE
 						listenerProc(request, reply);
 					END;
 				ELSE
-					reply.statuscode := res;
+					reply.statuscode := LONGINT( res ); (*! result type *)
 					WebHTTP.WriteStatus(reply, out)
 				END;
 				
@@ -645,7 +646,7 @@ BEGIN {EXCLUSIVE}
 END ShowHosts;
 
 PROCEDURE Cleanup;
-VAR t: Kernel.Timer; msg : ARRAY 32 OF CHAR; ignore : LONGINT;
+VAR t: Kernel.Timer; msg : ARRAY 32 OF CHAR; ignore : WORD;
 BEGIN
 	hitStat.Kill;
 	StopHTTP(msg, ignore);