Changeset 3491


Ignore:
Timestamp:
Dec 13, 2012, 1:27:26 AM (16 months ago)
Author:
wmb
Message:

Ping utility - clean up properly (close network driver) if set-host aborts due to an unresolvable hostname.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ofw/inet/ping.fth

    r2526 r3491  
    247247 
    248248: $ping  ( ip$ -- ) 
    249    open-net  " $set-host" $call-net 
     249   open-net 
     250   " $set-host" ['] $call-net catch  ?dup  if  ( x x errno ) 
     251      .error 2drop  close-net  exit 
     252   then 
    250253   /ping-max " allocate-ip" $call-net to ping-packet 
    251254   try-pings 
Note: See TracChangeset for help on using the changeset viewer.