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 / daccept.c < prev    next >
C/C++ Source or Header  |  1989-12-11  |  528b  |  31 lines

  1.  
  2. /*
  3.  *  DAccept.C
  4.  */
  5.  
  6. #include "lib.h"
  7.  
  8. PORT *
  9. DAccept(lisport)
  10. PORT *lisport;
  11. {
  12.     IOSTD *ior;
  13.     CHANN *chan = NULL;
  14.  
  15.     while (!chan && (ior = (IOSTD *)GetMsg(lisport))) {
  16.     switch(ior->io_Command) {
  17.     case DNCMD_SOPEN:
  18.         chan = (CHANN *)MakeChannel(ior, NULL);
  19.         break;
  20.     default:
  21.         ior->io_Error = 1;
  22.         break;
  23.     }
  24.     ReplyMsg((MSG *)ior);
  25.     }
  26.     if (lisport->mp_MsgList.lh_Head != (NODE *)&lisport->mp_MsgList.lh_Tail)
  27.     SetSignal(1 << lisport->mp_SigBit, 1 << lisport->mp_SigBit);
  28.     return((PORT *)chan);
  29. }
  30.  
  31.