home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / comm / tcp / amitcp / src / l / inet-handler / handler / timermsg.c < prev   
Encoding:
Text File  |  1994-04-05  |  849 b   |  31 lines

  1. /* $Id: timermsg.c,v 1.1 1993/11/17 12:21:51 too Exp $
  2.  *
  3.  * Copyright (c) 1993 AmiTCP/IP Group <amitcp-group@hut.fi>
  4.  *
  5.  * Created: Wed Nov 10 13:27:26 1993 too
  6.  * Last modified: Wed Nov 17 14:18:17 1993 too
  7.  */
  8. {
  9.   /*
  10.    * Timer reply... one ACTION_WAIT_CHAR request got timeout...or false
  11.    * signal.
  12.    */
  13.   struct ApplPort * applport;
  14.   
  15.   while ((applport = (struct ApplPort *)GetMsg(timermsgport)) != NULL) {
  16.     /*
  17.      * Well. applport doesn't exactly point to start of ApplPort
  18.      * structure but start of timerequest structure in it. Let's
  19.      * calculate the correct value.
  20.      */
  21.     (char *)applport-= (int)(&((struct ApplPort *)0)->ap_Tr);
  22.  
  23.     /*
  24.      * There must be pending ACTION_WAIT_CHAR here. Reply that no chars
  25.      * are available.
  26.      */
  27.     ReplyPkt(applport->ap_Packet, 0, 0);
  28.     applport->ap_Packet = NULL;
  29.   }
  30. }
  31.