tony2001                Fri Jul  3 14:02:29 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/sockets/tests  socket_sentto_recvfrom_unix.phpt 
  Log:
  stop polluting my /tmp dir
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt
diff -u php-src/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt:1.1.2.2 
php-src/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt:1.1.2.3
--- php-src/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt:1.1.2.2  Sun May 
17 18:08:09 2009
+++ php-src/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt  Fri Jul  3 
14:02:28 2009
@@ -26,8 +26,10 @@
     $bytes_sent = socket_sendto($socket, $msg, $len, 0); // cause warning
     $bytes_sent = socket_sendto($socket, $msg, $len, 0, $address);
     if ($bytes_sent == -1) {
+               @unlink($address);
         die('An error occured while sending to the socket');
     } else if ($bytes_sent != $len) {
+               @unlink($address);
         die($bytes_sent . ' bytes have been sent instead of the ' . $len . ' 
bytes expected');
     }
 
@@ -35,13 +37,17 @@
     var_dump(socket_recvfrom($socket, $buf, 0, 0, $from)); // expect false
     $bytes_received = socket_recvfrom($socket, $buf, 12, 0, $from);
     if ($bytes_received == -1) {
+               @unlink($address);
         die('An error occured while receiving from the socket');
     } else if ($bytes_received != $len) {
+               @unlink($address);
         die($bytes_received . ' bytes have been received instead of the ' . 
$len . ' bytes expected');
     }
     echo "Received $buf";
 
     socket_close($socket);
+       @unlink($address);
+?>
 --EXPECTF--
 Warning: socket_create(): Unable to create socket [93]: Protocol not supported 
in %s on line %d
 



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

Reply via email to