From: Luke Fitzgerald Date: Sun, 13 Jun 2010 02:42:21 +0000 (+0100) Subject: - Corrected PhotoSticker bug in phpmsnclass X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0083e58db304704be71c6c2fe9dba5484b7ae492;p=quix0rs-gnu-social.git - Corrected PhotoSticker bug in phpmsnclass - Update time till next ping when a command is sent --- diff --git a/plugins/Msn/extlib/phpmsnclass/msn.class.php b/plugins/Msn/extlib/phpmsnclass/msn.class.php index 65525fe556..ef4f45b441 100644 --- a/plugins/Msn/extlib/phpmsnclass/msn.class.php +++ b/plugins/Msn/extlib/phpmsnclass/msn.class.php @@ -180,7 +180,7 @@ class MSN { $this->retry_wait = isset($Configs['retry_wait']) ? $Configs['retry_wait'] : 30; $this->backup_file = isset($Configs['backup_file']) ? $Configs['backup_file'] : true; $this->update_pending = isset($Configs['update_pending']) ? $Configs['update_pending'] : true; - $this->PhotoStickerFile=$Configs['PhotoSticker']; + $this->PhotoStickerFile=isset($Configs['PhotoSticker']) ? $Configs['PhotoSticker'] : false; $this->IgnoreList=isset($Configs['IgnoreList'])?$Configs['IgnoreList']:false; if($this->Emotions = isset($Configs['Emotions']) ? $Configs['Emotions']:false) { @@ -3626,15 +3626,8 @@ X-OIM-Sequence-Num: 1 $this->SB_writedata($aMessage); - if (feof($this->SBFp)) - { - // lost connection? error? try OIM later - @fclose($this->SBFp); - //TODO introduce callback to add offline message to queue? - return false; - } - $this->SB_writeln("OUT"); - @fclose($this->SBFp); + // Don't close the SB session, we might as well leave it open + return true; } @@ -3651,6 +3644,10 @@ X-OIM-Sequence-Num: 1 return true; } + private function getSBSession($to) { + + } + public function sendMessage($message, $to) { if($message != '') { list($name,$host,$network)=explode('@',$to); diff --git a/plugins/Msn/msnmanager.php b/plugins/Msn/msnmanager.php index 99ac219157..1ef496f56f 100644 --- a/plugins/Msn/msnmanager.php +++ b/plugins/Msn/msnmanager.php @@ -139,6 +139,10 @@ class MsnManager extends ImManager return false; } $this->conn->sflapSend($data[0],$data[1],$data[2],$data[3]); + + // Sending a command updates the time till next ping + $this->lastping = time(); + $this->pingInterval = 50; return true; } }