version 1.78, 1997/07/09 17:03:23
|
version 1.79, 1997/08/07 12:52:03
|
Line 208 int docid;
|
Line 208 int docid;
|
if ((me = (AHTReqContext *) TtaGetMemory (sizeof (AHTReqContext))) == NULL) |
if ((me = (AHTReqContext *) TtaGetMemory (sizeof (AHTReqContext))) == NULL) |
outofmem (__FILE__, "Context_new"); |
outofmem (__FILE__, "Context_new"); |
|
|
|
/* clean the associated file structure); |
|
HTRequest_setOutputStream (me->request, NULL); |
|
|
/* Bind the Context object together with the Request Object */ |
/* Bind the Context object together with the Request Object */ |
|
|
me->request = HTRequest_new (); |
me->request = HTRequest_new (); |
Line 299 AHTReqContext *me;
|
Line 302 AHTReqContext *me;
|
TtaFreeMemory ((void *) docid_status); |
TtaFreeMemory ((void *) docid_status); |
} |
} |
} |
} |
HTRequest_delete (me->request); |
|
|
|
|
if (HTRequest_outputStream (me->request)) |
|
AHTFWriter_FREE (me->request->output_stream); |
|
|
|
HTRequest_delete (me->request); |
|
|
if (me->error_stream != (char *) NULL) |
if (me->error_stream != (char *) NULL) |
HT_FREE (me->error_stream); |
HT_FREE (me->error_stream); |
# ifndef _WINDOWS |
# ifndef _WINDOWS |
Line 315 AHTReqContext *me;
|
Line 322 AHTReqContext *me;
|
/* for the ASYNC mode, free the memory we allocated in GetObjectWWW |
/* for the ASYNC mode, free the memory we allocated in GetObjectWWW |
or in PutObjectWWW */ |
or in PutObjectWWW */ |
{ |
{ |
TtaFreeMemory (me->urlName); |
if (me->urlName) |
me->urlName = NULL; |
TtaFreeMemory (me->urlName); |
TtaFreeMemory (me->outputfile); |
if (me->outputfile) |
me->outputfile = NULL; |
TtaFreeMemory (me->outputfile); |
} |
} |
|
|
TtaFreeMemory ((void *) me); |
TtaFreeMemory ((void *) me); |
Line 525 int status;
|
Line 532 int status;
|
|
|
/* Start request with new credentials */ |
/* Start request with new credentials */ |
|
|
if (me->output) { |
if (HTRequest_outputStream (me->request) != NULL) { |
#ifdef DEBUG_LIBWWW |
#ifdef DEBUG_LIBWWW |
fprintf (stderr, "redirection_handler: New URL is %s, closing " |
fprintf (stderr, "redirection_handler: New URL is %s, closing " |
"FILE %p\n", me->urlName, me->output); |
"FILE %p\n", me->urlName, me->output); |
#endif |
#endif |
AHTFWriter_FREE (request->output_stream); |
AHTFWriter_FREE (request->output_stream); |
if (me->output != stdout) { /* Are we writing to a file? */ |
if (me->output != stdout) { /* Are we writing to a file? */ |
fclose (me->output); |
fclose (me->output); |
me->output = NULL; |
me->output = NULL; |
} |
} |
} |
} |
|
|
me->reqStatus = HT_NEW; /* reset the status */ |
me->reqStatus = HT_NEW; /* reset the status */ |
Line 592 int status;
|
Line 599 int status;
|
|
|
if (status == HT_LOADED || |
if (status == HT_LOADED || |
status == HT_CREATED || |
status == HT_CREATED || |
status == HT_NO_DATA) |
status == HT_NO_DATA || |
|
me->reqStatus == HT_ABORT) |
error_flag = FALSE; |
error_flag = FALSE; |
else |
else |
error_flag = TRUE; |
error_flag = TRUE; |
Line 1612 boolean error_html;
|
Line 1620 boolean error_html;
|
if (me->output) |
if (me->output) |
fclose (me->output); |
fclose (me->output); |
|
|
if ((mode & AMAYA_ASYNC) || (mode & AMAYA_IASYNC)) { |
|
if (me->outputfile) |
|
TtaFreeMemory (me->outputfile); |
|
if (me->urlName) |
|
TtaFreeMemory (me->urlName); |
|
} |
|
|
|
if (me->reqStatus == HT_ERR) { |
if (me->reqStatus == HT_ERR) { |
status = HT_ERROR; |
status = HT_ERROR; |
/* show an error message on the status bar */ |
/* show an error message on the status bar */ |
Line 1636 boolean error_html;
|
Line 1637 boolean error_html;
|
AHTReqContext_delete (me); |
AHTReqContext_delete (me); |
} |
} |
} |
} |
TtaHandlePendingEvents (); |
/* TtaHandlePendingEvents (); */ |
|
|
#else /* !_WINDOWS */ |
#else /* !_WINDOWS */ |
|
|
Line 1647 boolean error_html;
|
Line 1648 boolean error_html;
|
if (me->output && me->output != stdout) |
if (me->output && me->output != stdout) |
fclose (me->output); |
fclose (me->output); |
|
|
if ((mode & AMAYA_ASYNC) || (mode & AMAYA_IASYNC)) { |
|
if (me->outputfile) |
|
TtaFreeMemory (me->outputfile); |
|
if (me->urlName) |
|
TtaFreeMemory (me->urlName); |
|
} |
|
|
|
if (me->reqStatus == HT_ERR) { |
if (me->reqStatus == HT_ERR) { |
status = HT_ERROR; |
status = HT_ERROR; |
/* show an error message on the status bar */ |
/* show an error message on the status bar */ |
Line 1671 boolean error_html;
|
Line 1665 boolean error_html;
|
AHTReqContext_delete (me); |
AHTReqContext_delete (me); |
} |
} |
} |
} |
TtaHandlePendingEvents (); |
/*TtaHandlePendingEvents (); */ |
|
|
#endif /* !_WINDOWS */ |
#endif /* !_WINDOWS */ |
|
|
Line 1979 int docid;
|
Line 1973 int docid;
|
# ifndef _WINDOWS |
# ifndef _WINDOWS |
RequestKillAllXtevents (me); |
RequestKillAllXtevents (me); |
# endif _WINDOWS |
# endif _WINDOWS |
HTRequest_kill (me->request); |
|
|
|
|
HTRequest_kill (me->request); |
if ((me->mode & AMAYA_ASYNC) || |
if ((me->mode & AMAYA_ASYNC) || |
(me->mode & AMAYA_IASYNC)) |
(me->mode & AMAYA_IASYNC)) |
{ |
{ |