Diff for /Amaya/amaya/AHTBridge.c between versions 1.81 and 1.82

version 1.81, 2002/05/08 03:25:04 version 1.82, 2002/10/21 07:07:27
Line 197  static void AHTCallback_bridgeGTK (gpoin Line 197  static void AHTCallback_bridgeGTK (gpoin
   ended normally, the function will call any callback associated to the    ended normally, the function will call any callback associated to the
   request. Otherwise, it will just mark the request as over.    request. Otherwise, it will just mark the request as over.
   -------------------------------------------------------------------*/    -------------------------------------------------------------------*/
 void  ProcessTerminateRequest (HTRequest * request, HTResponse * response, void *param, int status)  void  ProcessTerminateRequest (HTRequest *request, HTResponse *response,
                                  void *param, int status)
 {     {   
   AHTReqContext *me = HTRequest_context (request);    AHTReqContext *me = HTRequest_context (request);
   
Line 207  void  ProcessTerminateRequest (HTRequest Line 208  void  ProcessTerminateRequest (HTRequest
   
 #ifdef DEBUG_LIBWWW    #ifdef DEBUG_LIBWWW  
   if (THD_TRACE)    if (THD_TRACE)
     fprintf (stderr,"ProcessTerminateRequest: processing req %p, url %s, status %d\n", me, me->urlName, me->reqStatus);        fprintf (stderr,"ProcessTerminateRequest: processing req %p, url %s,\
    status %d\n", me, me->urlName, me->reqStatus);  
 #endif /* DEBUG_LIBWWW */  #endif /* DEBUG_LIBWWW */
   if (me->reqStatus == HT_END)    if (me->reqStatus == HT_END && status >= 0)
     {      {
       if (AmayaIsAlive ()  && me->terminate_cbf)        if (AmayaIsAlive ()  && me->terminate_cbf)
         (*me->terminate_cbf) (me->docid, 0, me->urlName, me->outputfile, &(me->http_headers), me->context_tcbf);          (*me->terminate_cbf) (me->docid, 0, me->urlName, me->outputfile,
                                 &(me->http_headers), me->context_tcbf);
   
     }      }
   else if (me->reqStatus == HT_ABORT)    else if (me->reqStatus == HT_ABORT)
Line 220  void  ProcessTerminateRequest (HTRequest Line 223  void  ProcessTerminateRequest (HTRequest
        button. We erase the incoming file, if it exists */         button. We erase the incoming file, if it exists */
     {      {
       if (AmayaIsAlive () && me->terminate_cbf)        if (AmayaIsAlive () && me->terminate_cbf)
         (*me->terminate_cbf) (me->docid, -1, me->urlName, me->outputfile, &(me->http_headers), me->context_tcbf);          (*me->terminate_cbf) (me->docid, -1, me->urlName, me->outputfile,
                                 &(me->http_headers), me->context_tcbf);
       if (me->outputfile && me->outputfile[0] != EOS)        if (me->outputfile && me->outputfile[0] != EOS)
         {          {
           TtaFileUnlink (me->outputfile);            TtaFileUnlink (me->outputfile);
           me->outputfile[0] = EOS;             me->outputfile[0] = EOS; 
         }           } 
     }      }
   else if (me->reqStatus == HT_ERR)    else if (me->reqStatus == HT_ERR ||
              (me->reqStatus == HT_END && status < 0))
     {      {
       /* there was an error */        /* there was an error */
       if (AmayaIsAlive && me->terminate_cbf)        if (AmayaIsAlive && me->terminate_cbf)
         (*me->terminate_cbf) (me->docid, -1, me->urlName, me->outputfile, &(me->http_headers), me->context_tcbf);          (*me->terminate_cbf) (me->docid, -2, me->urlName, me->outputfile,
                                 &(me->http_headers), me->context_tcbf);
               
       if (me->outputfile && me->outputfile[0] != EOS)        if (me->outputfile && me->outputfile[0] != EOS)
         {          {

Removed from v.1.81  
changed lines
  Added in v.1.82


Webmaster