cvs: pear /Net_NNTP/NNTP/Protocol Client.php

From: Date: Tue, 28 Feb 2006 17:51:50 +0000
Subject: cvs: pear /Net_NNTP/NNTP/Protocol Client.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38745@lists.php.net to get a copy of this message
heino Tue Feb 28 17:51:50 2006 UTC Modified files: /pear/Net_NNTP/NNTP/Protocol Client.php Log: Handle 'unexpected' 502 responces http://cvs.php.net/viewcvs.cgi/pear/Net_NNTP/NNTP/Protocol/Client.php?r1=1.15&r2=1.16&diff_format=u Index: pear/Net_NNTP/NNTP/Protocol/Client.php diff -u pear/Net_NNTP/NNTP/Protocol/Client.php:1.15 pear/Net_NNTP/NNTP/Protocol/Client.php:1.16 --- pear/Net_NNTP/NNTP/Protocol/Client.php:1.15 Sun Feb 5 21:42:44 2006 +++ pear/Net_NNTP/NNTP/Protocol/Client.php Tue Feb 28 17:51:50 2006 @@ -62,7 +62,7 @@ * @author Heino H. Gehlsen <heino@gehlsen.dk> * @copyright 2002-2005 Heino H. Gehlsen <heino@gehlsen.dk>. All Rights Reserved. * @license http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 W3C® SOFTWARE NOTICE AND LICENSE - * @version CVS: $Id: Client.php,v 1.15 2006/02/05 21:42:44 heino Exp $ + * @version CVS: $Id: Client.php,v 1.16 2006/02/28 17:51:50 heino Exp $ * @link http://pear.php.net/package/Net_NNTP * @see */ @@ -467,7 +467,13 @@ $text = $this->_currentStatusResponse(); } - return $this->throwError('Unexpected response', $code, $text); + switch ($code) { + case NET_NNTP_PROTOCOL_RESPONSECODE_NOT_PERMITTED: // 502, 'access restriction or permission denied' / service permanently unavailable + return $this->throwError('Command not permitted / Access restriction / Permission denied', $code, $text); + break; + default: + return $this->throwError("Unexpected response: '$text'", $code, $text); + } } // }}}

« previous php.pear.cvs (#38745) next »