Subversion Repositories oidinfo_api

Rev

Rev 13 | Rev 15 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13 Rev 14
Line 16... Line 16...
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
 * See the License for the specific language governing permissions and
17
 * See the License for the specific language governing permissions and
18
 * limitations under the License.
18
 * limitations under the License.
19
 */
19
 */
20
 
20
 
21
error_reporting(E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED);
21
// error_reporting(E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED);
22
 
22
 
23
if(!defined('STDIN'))  define('STDIN',  fopen('php://stdin',  'rb'));
23
if(!defined('STDIN'))  define('STDIN',  fopen('php://stdin',  'rb'));
24
if(!defined('STDOUT')) define('STDOUT', fopen('php://stdout', 'wb'));
24
if(!defined('STDOUT')) define('STDOUT', fopen('php://stdout', 'wb'));
25
if(!defined('STDERR')) define('STDERR', fopen('php://stderr', 'wb'));
25
if(!defined('STDERR')) define('STDERR', fopen('php://stderr', 'wb'));
26
 
26
 
Line 1019... Line 1019...
1019
 
1019
 
1020
        protected function spp_reader_avail($oid, $failcount=0) {
1020
        protected function spp_reader_avail($oid, $failcount=0) {
1021
                $in = "${oid}\n\0"; // PHP's socket_send() does not send a trailing \n . There needs to be something after the \n ... :(
1021
                $in = "${oid}\n\0"; // PHP's socket_send() does not send a trailing \n . There needs to be something after the \n ... :(
1022
 
1022
 
1023
                if ($failcount >= self::SPP_MAX_CONNECTION_ATTEMPTS) {
1023
                if ($failcount >= self::SPP_MAX_CONNECTION_ATTEMPTS) {
1024
                        echo "Query $oid: CONNECTION FAILED!\n";
1024
                        echo "Query $oid: CONNECTION TO SIMPLE PING PROVIDER FAILED!\n";
1025
                        return null;
1025
                        return null;
1026
                }
1026
                }
1027
 
1027
 
1028
                if (!$this->connected) {
1028
                if (!$this->connected) {
1029
                        $this->spp_reader_init();
1029
                        $this->spp_reader_init();