Skip to content
Snippets Groups Projects
Commit 6cfff6d2 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Small code fixes & cleanup

Change-Id: If2b66a9ecedff914469e220964ccd28b1efbce95
parent 97a62d3c
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@ if (PEAR::isError($client = _cozaepp_Client())) {
# Loop with message queue
while (!$last) {
# Request messages
$output= $client->request('
$request = $client->request('
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<poll op="req"/>
......@@ -82,7 +82,7 @@ while (!$last) {
# Decode response
$doc= new DOMDocument();
$doc->loadXML($output);
$doc->loadXML($request);
# Pull off code
$coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code');
......@@ -97,10 +97,13 @@ while (!$last) {
$last = 1;
}
$msgid = $doc->getElementsByTagName('msgQ')->item(0)->getAttribute('id');
$res = _cozaepp_ackpoll($client,$msgid);
if (PEAR::isError($res)) {
echo("ERROR: ".$res->getMessage()."\n");
$msgq = $doc->getElementsByTagName('msgQ')->item(0);
if ($msgq) {
$msgid = $doc->getElementsByTagName('msgQ')->item(0)->getAttribute('id');
$res = _cozaepp_ackpoll($client,$msgid);
if (PEAR::isError($res)) {
echo("ERROR: ".$res->getMessage()."\n");
}
}
} else {
......@@ -109,7 +112,7 @@ while (!$last) {
for ($m = 0; $m < $msgs->length; $m++) {
echo "\n";
echo "UNKNOWN CODE: $coderes, MESSAGE: '".$msgs->item($m)->textContent."', ID: $msgid\n";
echo $output;
echo $request;
echo "\n\n";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment