summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Duedal <hd@onlinecity.dk>2011-09-06 17:39:51 +0200
committerHans Duedal <hd@onlinecity.dk>2011-09-06 17:39:51 +0200
commita3e5e7f474231f28769f96d653a91a7a1a061291 (patch)
tree711646e2aabfbe907b45474b6e385636bf5557c2
parent9d18dc2dacf4f3d09b6cfb3d3beaeade3e4ccf43 (diff)
downloadphp-smpp-a3e5e7f474231f28769f96d653a91a7a1a061291.zip
php-smpp-a3e5e7f474231f28769f96d653a91a7a1a061291.tar.gz
php-smpp-a3e5e7f474231f28769f96d653a91a7a1a061291.tar.bz2
Removed array_push by accident in 9d18dc2dacf4f3d09b6cfb3d3beaeade3e4ccf43
-rw-r--r--smppclient.class.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/smppclient.class.php b/smppclient.class.php
index 1b39849..1d6fd53 100644
--- a/smppclient.class.php
+++ b/smppclient.class.php
@@ -580,8 +580,11 @@ class SmppClient
// Read PDUs until the one we are looking for shows up, or a generic nack pdu with matching sequence or null sequence
do{
$pdu=$this->readPDU();
- if ($pdu->sequence == $seq_number && ($pdu->id == $command_id || $pdu->id == SMPP::GENERIC_NACK)) return $pdu;
- if ($pdu->sequence == null && $pdu->id == SMPP::GENERIC_NACK) return $pdu;
+ if ($pdu) {
+ if ($pdu->sequence == $seq_number && ($pdu->id == $command_id || $pdu->id == SMPP::GENERIC_NACK)) return $pdu;
+ if ($pdu->sequence == null && $pdu->id == SMPP::GENERIC_NACK) return $pdu;
+ array_push($this->pdu_queue, $pdu); // unknown PDU push to queue
+ }
} while($pdu);
return false;
}