dmitry          Fri Aug 15 09:27:27 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/standard/tests/streams 
                                        
stream_get_meta_data_socket_variation1.phpt 
                                        
stream_get_meta_data_socket_variation2.phpt 
                                        
stream_get_meta_data_socket_variation3.phpt 
                                        
stream_get_meta_data_socket_variation4.phpt 
  Log:
  Fixed possible infinity loop in tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt?r1=1.1.2.4&r2=1.1.2.5&diff_format=u
Index: 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt
diff -u 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt:1.1.2.4
 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt:1.1.2.5
--- 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt:1.1.2.4
      Thu Mar 20 12:14:06 2008
+++ 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt  
    Fri Aug 15 09:27:27 2008
@@ -5,12 +5,21 @@
 
 /* Setup socket server */
 $server = stream_socket_server('tcp://127.0.0.1:31337');
+if ($server === false) {
+       die("stream_socket_server() failed\n");
+}
 
 /* Connect to it */
 $client = fsockopen('tcp://127.0.0.1:31337');
+if ($client === false) {
+       die("fsockopen() failed\n");
+}
 
 /* Accept that connection */
 $socket = stream_socket_accept($server);
+if ($socket === false) {
+       die("stream_socket_accept() failed\n");
+}
 
 echo "Write some data:\n";
 fwrite($socket, "abcdefg\n1234567\nxyzxyz\n");
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt?r1=1.1.2.4&r2=1.1.2.5&diff_format=u
Index: 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt
diff -u 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt:1.1.2.4
 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt:1.1.2.5
--- 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt:1.1.2.4
      Thu Mar 20 12:14:06 2008
+++ 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt  
    Fri Aug 15 09:27:27 2008
@@ -5,12 +5,21 @@
 
 /* Setup socket server */
 $server = stream_socket_server('tcp://127.0.0.1:31337');
+if ($server === false) {
+       die("stream_socket_server() failed\n");
+}
 
 /* Connect to it */
 $client = fsockopen('tcp://127.0.0.1:31337');
+if ($client === false) {
+       die("fsockopen() failed\n");
+}
 
 /* Accept that connection */
 $socket = stream_socket_accept($server);
+if ($socket === false) {
+       die("stream_socket_accept() failed\n");
+}
 
 var_dump(stream_get_meta_data($client));
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt?r1=1.1.2.4&r2=1.1.2.5&diff_format=u
Index: 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt
diff -u 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt:1.1.2.4
 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt:1.1.2.5
--- 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt:1.1.2.4
      Thu Mar 20 12:14:06 2008
+++ 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt  
    Fri Aug 15 09:27:27 2008
@@ -5,12 +5,21 @@
 
 /* Setup socket server */
 $server = stream_socket_server('tcp://127.0.0.1:31337');
+if ($server === false) {
+       die("stream_socket_server() failed\n");
+}
 
 /* Connect to it */
 $client = fsockopen('tcp://127.0.0.1:31337');
+if ($client === false) {
+       die("fsockopen() failed\n");
+}
 
 /* Accept that connection */
 $socket = stream_socket_accept($server);
+if ($socket === false) {
+       die("stream_socket_accept() failed\n");
+}
 
 var_dump(stream_get_meta_data($client));
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u
Index: 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt
diff -u 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt:1.1.2.3
 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt:1.1.2.4
--- 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt:1.1.2.3
      Thu Mar 20 08:35:44 2008
+++ 
php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt  
    Fri Aug 15 09:27:27 2008
@@ -5,12 +5,21 @@
 
 /* Setup socket server */
 $server = stream_socket_server('tcp://127.0.0.1:31337');
+if ($server === false) {
+       die("stream_socket_server() failed\n");
+}
 
 /* Connect to it */
 $client = fsockopen('tcp://127.0.0.1:31337');
+if ($client === false) {
+       die("fsockopen() failed\n");
+}
 
 /* Accept that connection */
 $socket = stream_socket_accept($server);
+if ($socket === false) {
+       die("stream_socket_accept() failed\n");
+}
 
 echo "Write some data:\n";
 fwrite($socket, "abcdefg\n1234567\nxyzxyz\n");



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to