From 964ad4b3bc3686bd7e2d602f22482e66cd373e92 Mon Sep 17 00:00:00 2001 From: Mark Holtzhausen Date: Thu, 17 Dec 2009 11:17:48 +0200 Subject: [PATCH] Updated debug information --- webservice/clienttools/ajaxhandler.php | 15 +++++++++------ webservice/clienttools/clienttools_syslog.php | 7 +++++++ webservice/clienttools/comms.php | 3 +++ webservice/clienttools/services/0.9/auth.php | 3 +++ 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/webservice/clienttools/ajaxhandler.php b/webservice/clienttools/ajaxhandler.php index 22fc39f..df38c38 100644 --- a/webservice/clienttools/ajaxhandler.php +++ b/webservice/clienttools/ajaxhandler.php @@ -38,10 +38,8 @@ class ajaxHandler{ $this->ret=new jsonResponseObject(); } $this->ret->location='ajaxhandler'; - $this->log("[__construct]ENTERING PREPARATIONS"); $this->remoteIp = (getenv(HTTP_X_FORWARDED_FOR)) ? getenv(HTTP_X_FORWARDED_FOR) : getenv(REMOTE_ADDR); - $this->log("[__construct]Remote IP determined as: {$this->remoteIp}"); $noAuthRequests=is_array($noAuthRequests)?$noAuthRequests:split(',',(string)$noAuthRequests); $this->registerNoAuthRequest($noAuthRequests); @@ -50,9 +48,7 @@ class ajaxHandler{ $this->digestToken=isset($_GET['msgAuth'])?$_GET['msgAuth']:(isset($_POST['msgAuth'])?$_POST['msgAuth']:''); $this->log("[__construct]DigestToken Found: {$this->digestToken}"); - $this->ret->addDebug('Raw Request',$this->rawRequestObject); - $this->ret->addDebug('DigestToken Received',$this->digestToken); - $this->ret->addDebug('Remote IP',$this->remoteIp); + @@ -61,6 +57,13 @@ class ajaxHandler{ $this->req=new jsonWrapper($this->rawRequestObject); $this->auth=$this->structArray('user,pass,passhash,appType,session,token,version',$this->req->jsonArray['auth']); $this->request=$this->structArray('service,function,parameters',$this->req->jsonArray['request']); + + Clienttools_Syslog::logInfo('--','--','REQUESTING: '.$this->request['service'].'::'.$this->request['function'],$this->request); + + + $this->ret->addDebug('Raw Request',$this->rawRequestObject); + $this->ret->addDebug('DigestToken Received',$this->digestToken); + $this->ret->addDebug('Remote IP',$this->remoteIp); //Add additional parameters $add_params=array_merge($_GET,$_POST); @@ -75,7 +78,7 @@ class ajaxHandler{ $this->ret->setDebug('Server Versions',$this->getServerVersions()); $this->ret->addDebug('Session From Server: ',$this->auth); - if($this->auth['session'])session_id($this->auth['session']); +// if($this->auth['session'])session_id($this->auth['session']); $this->session=session_id(); $this->ret->addDebug('Session in PHP: ',$this->session); $this->log("[__construct]Session Restarted as: {$this->session}"); diff --git a/webservice/clienttools/clienttools_syslog.php b/webservice/clienttools/clienttools_syslog.php index b0ba042..82c1121 100644 --- a/webservice/clienttools/clienttools_syslog.php +++ b/webservice/clienttools/clienttools_syslog.php @@ -1,4 +1,11 @@ logout(); + session_id($newSessId); + $this->Response->setStatus('session_id',$newSessId); $this->setResponse(array('logout'=>true)); return true; } -- libgit2 0.21.4