Diff for /Amaya/amaya/AHTBridge.c between versions 1.34 and 1.35

version 1.34, 1997/06/28 13:48:50 version 1.35, 1997/07/04 13:13:55
Line 61  static const SockOps ReadBits = FD_READ Line 61  static const SockOps ReadBits = FD_READ
 static const SockOps WriteBits = FD_WRITE | FD_CONNECT;  static const SockOps WriteBits = FD_WRITE | FD_CONNECT;
 static const SockOps ExceptBits = FD_OOB;  static const SockOps ExceptBits = FD_OOB;
   
   
 /* Private functions */  /* Private functions */
   
 /*--------------------------------------------------------------------  /*--------------------------------------------------------------------
Line 159  XtInputId          *id; Line 160  XtInputId          *id;
    /* first we change the status of the request, to say it     /* first we change the status of the request, to say it
       has entered a critical section */        has entered a critical section */
   
      /* JK: Clean this up */
    if ((HTRequest_outputStream(me->request) == (HTStream *) NULL))     if ((HTRequest_outputStream(me->request) == (HTStream *) NULL))
       fprintf(stderr,"\n **ERROR** opening %s\n\n",me->urlName);        fprintf(stderr,"\n **ERROR** opening %s\n\n",me->urlName);
   
Line 385  HTPriority          p; Line 387  HTPriority          p;
   
    /* get the request associated to the socket number */     /* get the request associated to the socket number */
   
   /*
   #ifdef _WINDOWS
        if (me->reqStatus == HT_NEW) {
                           HTEventrg_unregister (sock, ops);
            }
   #endif
   */
   
    if ((status = HTEventrg_register (sock, rqp, ops,     if ((status = HTEventrg_register (sock, rqp, ops,
                                      cbf, p)) != HT_OK)                                       cbf, p)) != HT_OK)
Line 449  HTPriority          p; Line 458  HTPriority          p;
    return (status);     return (status);
 }  }
   
 #ifdef _WINDOWS  
 /*----------------------------------------------------------------------  
   AHTEvent_unregister  
   callback called by libwww each time a request is unregistered. This  
   function takes care of unregistering the pertinent Xt events  
   associated with the request's socket. In addition, it unregisters  
   the request from libwww.  
   ----------------------------------------------------------------------*/  
 #ifdef __STDC__  
 int                 AHTEvent_unregister (SOCKET sock, SockOps ops)  
 #else  
 int                 AHTEvent_unregister (sock, ops)  
 SOCKET              sock;  
 SockOps             ops;  
   
 #endif /* __STDC__ */  
 {  
    int                 status;  
   
    HTRequest          *rqp = NULL;  
    AHTReqContext      *me;  
   
    /* Libwww 5.0a does not take into account the third parameter  
       **  for this function call */  
   
    HTEventCallback    *cbf = (HTEventCallback *) __RetrieveCBF (sock, (SockOps) NULL, &rqp);  
   
    if (cbf)     {  
         if (rqp) {  
                 me = HTRequest_context (rqp);  
                 status = HTEventrg_unregister (sock, ops);  
                         if (me->reqStatus == HT_END)  
                                 AHTReqContext_delete (me);  
                 }  
    }  
    return (status);  
 }  
   
 #endif /* !WINDOWS */  
   
 #ifndef _WINDOWS  
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
   AHTEvent_unregister    AHTEvent_unregister
Line 517  SockOps             ops; Line 485  SockOps             ops;
   
    HTEventCallback    *cbf = (HTEventCallback *) __RetrieveCBF (sock, (SockOps) NULL, &rqp);     HTEventCallback    *cbf = (HTEventCallback *) __RetrieveCBF (sock, (SockOps) NULL, &rqp);
   
   #ifndef _WINDOWS
    if (cbf)     if (cbf)
      {       {
         if (rqp)          if (rqp)
Line 534  SockOps             ops; Line 503  SockOps             ops;
           }            }
      }       }
   
   #endif _WINDOWS
   
    status = HTEventrg_unregister (sock, ops);     status = HTEventrg_unregister (sock, ops);
   
    return (status);     return (status);
 }  }
   
   #ifndef _WINDOWS
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
   RequestKillAllXtevents    RequestKillAllXtevents
   front-end for kill all Xt events associated with the request pointed    front-end for kill all Xt events associated with the request pointed

Removed from v.1.34  
changed lines
  Added in v.1.35


Webmaster