[mw-devel] MW3 r1235 - trunk/webclient

dez at sucs.org dez at sucs.org
Sat Nov 13 16:05:54 GMT 2010


Author: dez
Date: 2010-11-13 16:05:53 +0000 (Sat, 13 Nov 2010)
New Revision: 1235

Modified:
   trunk/webclient/poll.php
Log:
Meant to commit this, not say.js (sigh)


Modified: trunk/webclient/poll.php
===================================================================
--- trunk/webclient/poll.php	2010-11-13 16:04:50 UTC (rev 1234)
+++ trunk/webclient/poll.php	2010-11-13 16:05:53 UTC (rev 1235)
@@ -1,5 +1,4 @@
 <?
-
 if (isset($_COOKIE['mwsess'])) {
 	$data = unserialize($_COOKIE['mwsess']);
 	$sess = (int)$data['pid'];
@@ -9,9 +8,6 @@
 	$auth = trim(@$_REQUEST['auth']);
 }
 
-$log = fopen("poll.log", "a");
-fwrite($log, "Poll hit pid='$sess' auth='$auth'\n");
-
 $path = "/var/run/mw/mwpoll.".$sess;
 
 header("Content-type: application/json; charset=utf-8");
@@ -25,13 +21,11 @@
 $msg = "auth $auth";
 if (@socket_send($sock, $msg, strlen($msg), 0)===FALSE) {
 	echo "{\"status\":\"Socket error\"}\n";
-	fwrite($log, "sock error: ".socket_strerror(socket_last_error())."\n");
 	exit;
 }
 
 if (@socket_recv($sock, $response, 4096, 0)===FALSE) {
 	echo "{\"status\":\"Socket error\"}\n";
-	fwrite($log, "sock error: ".socket_strerror(socket_last_error())."\n");
 	exit;
 }
 $res = json_decode($response, TRUE);
@@ -46,21 +40,16 @@
 
 if (@socket_send($sock, $msg, strlen($msg), MSG_EOF)===FALSE) {
 	echo "{\"status\":\"Socket error\"}\n";
-	fwrite($log, "sock error: ".socket_strerror(socket_last_error())."\n");
 	exit;
 }
 
 if (@socket_recv($sock, $response, 8192, 0)===FALSE) {
 	echo "{\"status\":\"Socket error\"}\n";
-	fwrite($log, "sock error: ".socket_strerror(socket_last_error())."\n");
 	exit;
 }
 
 if ($response!="") echo $response."\n";
 else echo "[]\n";
 
-fwrite($log, "Response '$response'\n");
-
 socket_close($sock);
-fclose($log);
 ?>




More information about the mw-devel mailing list