Diff for /Amaya/amaya/AHTBridge.c between versions 1.51 and 1.52

version 1.51, 1998/02/04 09:53:34 version 1.52, 1998/03/11 17:24:43
Line 163  XtInputId          *id; Line 163  XtInputId          *id;
   
    me->reqStatus = HT_BUSY;     me->reqStatus = HT_BUSY;
   
    if ((status = (*cbf) (socket, rqp, ops)) != HT_OK)     status = (*cbf) (socket, rqp, ops);
 #ifdef DEBUG_LIBWWW  #ifdef DEBUG_LIBWWW
      if (status != HT_OK)
       HTTrace ("Callback.... returned a value != HT_OK");        HTTrace ("Callback.... returned a value != HT_OK");
 #endif  #endif
    /* Several states can happen after this callback. They     /* Several states can happen after this callback. They
Line 260  AHTReqContext *me; Line 261  AHTReqContext *me;
         
   if (me->reqStatus == HT_END)    if (me->reqStatus == HT_END)
     {      {
       if (me->terminate_cbf)        if (AmayaIsAlive () && me->terminate_cbf)
         (*me->terminate_cbf) (me->docid, 0, me->urlName, me->outputfile,          (*me->terminate_cbf) (me->docid, 0, me->urlName, me->outputfile,
                               me->content_type, me->context_tcbf);                                me->content_type, me->context_tcbf);
     }      }
Line 268  AHTReqContext *me; Line 269  AHTReqContext *me;
     /* either the application ended or the user pressed the stop       /* either the application ended or the user pressed the stop 
        button. We erase the incoming file, if it exists */         button. We erase the incoming file, if it exists */
     {      {
         if (AmayaIsAlive () && me->terminate_cbf)
           (*me->terminate_cbf) (me->docid, -1, me->urlName, me->outputfile,
                                 me->content_type, me->context_tcbf);
       if (me->outputfile && me->outputfile[0] != EOS)        if (me->outputfile && me->outputfile[0] != EOS)
         {          {
           TtaFileUnlink (me->outputfile);            TtaFileUnlink (me->outputfile);
Line 277  AHTReqContext *me; Line 281  AHTReqContext *me;
   else if (me->reqStatus == HT_ERR)    else if (me->reqStatus == HT_ERR)
     {      {
       /* there was an error */        /* there was an error */
       if (me->terminate_cbf)        if (AmayaIsAlive () && me->terminate_cbf)
         (*me->terminate_cbf) (me->docid, -1, me->urlName, me->outputfile,          (*me->terminate_cbf) (me->docid, -1, me->urlName, me->outputfile,
                               me->content_type, me->context_tcbf);                                me->content_type, me->context_tcbf);
               
Line 287  AHTReqContext *me; Line 291  AHTReqContext *me;
           me->outputfile[0] = EOS;            me->outputfile[0] = EOS;
         }          }
     }      }
     else if (me->reqStatus == HT_ABORT)  
       {  
       if (me->outputfile && me->outputfile[0] != EOS)  
         {  
           TtaFileUnlink (me->outputfile);  
           me->outputfile[0] = EOS;  
         }  
       }  
   
 #ifdef _WINDOWS  #ifdef _WINDOWS
    /* we erase the context if we're dealing with an asynchronous request */     /* we erase the context if we're dealing with an asynchronous request */
Line 598  SockOps             ops; Line 594  SockOps             ops;
   
 #ifndef _WINDOWS     #ifndef _WINDOWS   
 #ifdef DEBUG_LIBWWW  #ifdef DEBUG_LIBWWW
    fprintf (stderr, "AHTEventUnregister: cbf = %d, sock = %d, rqp = %d, ops= %x", cbf, sock, rqp, ops);     fprintf (stderr, "AHTEventUnregister: cbf = %d, sock = %d, rqp = %d, ops= %x\n", cbf, sock, rqp, ops);
 #endif /* DEBUG_LIBWWW */  #endif /* DEBUG_LIBWWW */
   
    v = HASH (sock);     v = HASH (sock);

Removed from v.1.51  
changed lines
  Added in v.1.52


Webmaster