From 2acdbc5f052f24af5de2ab013a4fae5eeb1c3305 Mon Sep 17 00:00:00 2001 From: paulr Date: Fri, 11 Feb 2011 02:24:46 +1100 Subject: [PATCH] one little bloody return statement --- gaas/gaasd/gaasclient.php | 1 + gaas/lib/gaasClientMessages.php | 1 + gaas/lib/gaasdClient.php | 7 ++++++- gaas/lib/gaasdMessages.php | 4 ++++ 4 files changed, 12 insertions(+), 1 deletions(-) diff --git a/gaas/gaasd/gaasclient.php b/gaas/gaasd/gaasclient.php index 5e075a6..8703975 100644 --- a/gaas/gaasd/gaasclient.php +++ b/gaas/gaasd/gaasclient.php @@ -28,6 +28,7 @@ switch($argv[1]) { $ret = $myga->MSG_INIT_SERVER("AD", $argv[3], $argv[4], $argv[5], $argv[6], $argv[7]); echo "Ret:\n"; print_r($ret); + echo "\n"; if($ret) { echo "initialising server succeeded\n"; } else { diff --git a/gaas/lib/gaasClientMessages.php b/gaas/lib/gaasClientMessages.php index 5e5e2ce..9b138a4 100644 --- a/gaas/lib/gaasClientMessages.php +++ b/gaas/lib/gaasClientMessages.php @@ -44,6 +44,7 @@ function gaasInitServer_clientrecv($params) { echo "in recv, params\n"; print_r($params); + echo "\n"; return $params; } diff --git a/gaas/lib/gaasdClient.php b/gaas/lib/gaasdClient.php index 4226368..d5ee3f7 100644 --- a/gaas/lib/gaasdClient.php +++ b/gaas/lib/gaasdClient.php @@ -51,6 +51,7 @@ class GAASClient { // first check we got something that makes sense if(preg_match("/^AS:.*:EOD/", $recvd) < 1) { socket_close($socket); + echo "Returned data is not in right format\n"; // we have a problem jim return false; } @@ -60,11 +61,15 @@ class GAASClient { $component = unserialize(base64_decode($xps[1])); if($component["type"] != $message_type) { + echo "Message type was not the same as original message\n"; // we have a problem jim socket_close($socket); return false; } + //echo "component\n"; + //print_r($component); + socket_close($socket); return $component["data"]; @@ -85,7 +90,7 @@ class GAASClient { //echo "real function is $function_send, $function_recv\n"; if(function_exists($function_send) && function_exists($function_recv)) { - $function_recv($this->sendReceive($st_defined, $function_send($params))); + return $function_recv($this->sendReceive($st_defined, $function_send($params))); } else { error_log("Function, $function does not exist!"); } diff --git a/gaas/lib/gaasdMessages.php b/gaas/lib/gaasdMessages.php index a0afbeb..5ca73a0 100644 --- a/gaas/lib/gaasdMessages.php +++ b/gaas/lib/gaasdMessages.php @@ -45,6 +45,9 @@ function gaasInitServer_server($msg) } if($msg["backend"] == "AD") { + echo "Backend is AD with params of\n"; + print_r($msg); + echo "\n"; $backEnd = "AD"; // attempt connect to AD, verify creds $addom = $msg["domain"]; @@ -83,6 +86,7 @@ function gaasInitServer_server($msg) $backEnd = "AD"; // and that should be it... i think cept im in a forked erg.. lets assume it works, need pain i do not. + echo "its all good at the server\n"; return true; } else if($msg["backend"] == "IN") { -- 1.7.0.4