Update of /project/snmp1/cvsroot/snmp1 In directory clnet:/tmp/cvs-serv11366
Modified Files: snmp.lisp Log Message: Arms and legs type bug fix
--- /project/snmp1/cvsroot/snmp1/snmp.lisp 2007/02/03 17:23:20 1.4 +++ /project/snmp1/cvsroot/snmp1/snmp.lisp 2007/02/03 20:17:16 1.5 @@ -156,15 +156,15 @@ ;; ))
(defun udp-send-and-receive (host port timeout repetitions message) -<<<<<<< HEAD/snmp.lisp "send one pqcket and receive one packet. Do timeouts and retries. This function is specific to sbcl" - (let ((socket (make-instance 'sb-bsd-sockets:inet-socket :protocol :udp :type :datagram)) - result - (recvbuf (make-array 2000 :element-type '(unsigned-byte 8)))) - (loop - repeat repetitions - do + (handler-case + (let ((socket (make-instance 'sb-bsd-sockets:inet-socket :protocol :udp :type :datagram)) + result + (recvbuf (make-array 2000 :element-type '(unsigned-byte 8)))) + (loop + repeat repetitions + do (sb-bsd-sockets:socket-send socket message nil :address (list host port)) (setf result (handler-case @@ -174,10 +174,9 @@ (declare (ignore peer-addr)) (subseq buf 0 len))) (timeout () #|(display :hei )|# nil))) - until result) + until result) (sb-BSD-SOCKETS:SOCKET-CLOSE socket) - result - ) + result) (sb-bsd-sockets:socket-error ())))