diff options
author | Hans Duedal <hd@onlinecity.dk> | 2011-07-08 16:03:49 +0200 |
---|---|---|
committer | Hans Duedal <hd@onlinecity.dk> | 2011-07-08 16:03:49 +0200 |
commit | 5dc4d005549bb51d6d7fa1532a3be142f301cc73 (patch) | |
tree | 43f670493e9f00f7e8fa89f544fb461603da2edc /protocol | |
parent | 3135000d915871450613b90be8cdff761d46e384 (diff) | |
download | php-smpp-5dc4d005549bb51d6d7fa1532a3be142f301cc73.zip php-smpp-5dc4d005549bb51d6d7fa1532a3be142f301cc73.tar.gz php-smpp-5dc4d005549bb51d6d7fa1532a3be142f301cc73.tar.bz2 |
More porting from namespaced code
Diffstat (limited to 'protocol')
-rw-r--r-- | protocol/smppclient.class.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/protocol/smppclient.class.php b/protocol/smppclient.class.php index 4c552f5..4e083e4 100644 --- a/protocol/smppclient.class.php +++ b/protocol/smppclient.class.php @@ -163,7 +163,8 @@ class SmppClient if ($pdu === false) return false; // TSocket v. 0.6.0+ returns false on timeout //check for enquire link command if($pdu->id==SMPP::ENQUIRE_LINK){ - $this->sendPDU(SMPP::ENQUIRE_LINK_RESP, "", $pdu->sequence); + $response = new SmppPdu(SMPP::ENQUIRE_LINK_RESP, SMPP::ESME_ROK, $pdu->sequence, "\x00"); + $this->sendPDU($response); return false; } array_push($this->pdu_queue, $pdu); @@ -264,7 +265,7 @@ class SmppClient protected function submit_sm(SmppAddress $source, SmppAddress $destination, $short_message=null, $tags=null, $dataCoding=SMPP::DATA_CODING_DEFAULT, $priority=0x00, $scheduleDeliveryTime=null, $validityPeriod=null) { // Construct PDU with mandatory fields - $pdu = pack('a1cca'.(strlen($source->value)+1).'cca'.(strlen($destination->value)+1).'ccc'.(self::$sms_schedule_delivery_time ? 'a16x' : 'a1').(self::$sms_validity_period ? 'a16x' : 'a1').'ccccca'.(strlen($short_message)+(self::$sms_null_terminate_octetstrings ? 1 : 0)), + $pdu = pack('a1cca'.(strlen($source->value)+1).'cca'.(strlen($destination->value)+1).'ccc'.($scheduleDeliveryTime ? 'a16x' : 'a1').($validityPeriod ? 'a16x' : 'a1').'ccccca'.(strlen($short_message)+(self::$sms_null_terminate_octetstrings ? 1 : 0)), self::$sms_service_type, $source->ton, $source->npi, |