home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff294.lzh / DNet / amiga / lib / dunlisten.c < prev    next >
C/C++ Source or Header  |  1989-12-11  |  390b  |  22 lines

  1.  
  2. /*
  3.  *  DUnListen.C
  4.  */
  5.  
  6. #include "lib.h"
  7.  
  8. void
  9. DUnListen(lisport)
  10. PORT *lisport;
  11. {
  12.     if (lisport) {
  13.     char *ptr = lisport->mp_Node.ln_Name;
  14.     Forbid();                       /*  task-atomic operation       */
  15.     while (DNAAccept(lisport));     /*  remove all pending requests */
  16.     DeletePort(lisport);            /*  gone!                       */
  17.     Permit();
  18.     FreeMem(ptr, NAMELEN);
  19.     }
  20. }
  21.  
  22.