version 1.12, 1996/12/16 17:29:43
|
version 1.13, 1996/12/25 04:44:17
|
Line 276 HTStream *target;
|
Line 276 HTStream *target;
|
|
|
if (status == HT_LOADED || status == HT_OK) |
if (status == HT_LOADED || status == HT_OK) |
{ |
{ |
if (PROT_TRACE) |
if (PROT_TRACE) |
HTTrace ("Posting Data Target is SAVED\n"); |
HTTrace ("Posting Data Target is SAVED\n"); |
(*target->isa->flush) (target); |
(*target->isa->flush) (target); |
return HT_LOADED; |
return (HT_LOADED); |
} |
} |
if (status == HT_WOULD_BLOCK) |
if (status == HT_WOULD_BLOCK) |
{ |
{ |
Line 589 int status;
|
Line 589 int status;
|
#endif |
#endif |
{ |
{ |
AHTReqContext *me = (AHTReqContext *) HTRequest_context (request); |
AHTReqContext *me = (AHTReqContext *) HTRequest_context (request); |
|
boolean error_flag; |
|
|
if (!me) |
if (!me) |
return HT_OK; /* not an Amaya request */ |
return HT_OK; /* not an Amaya request */ |
|
|
|
if (status == HT_LOADED || status == HT_CREATED || status == HT_NO_DATA) |
|
error_flag = FALSE; |
|
else |
|
error_flag = TRUE; |
|
|
/* output any errors from the server */ |
/* output any errors from the server */ |
|
|
/*** |
/*** |
Line 613 int status;
|
Line 619 int status;
|
/* we are writing to a file */ |
/* we are writing to a file */ |
if (me->reqStatus != HT_ABORT) |
if (me->reqStatus != HT_ABORT) |
{ /* if the request was not aborted and */ |
{ /* if the request was not aborted and */ |
if (status != HT_LOADED) |
if (error_flag) |
{ /* there were some errors */ |
{ /* there were some errors */ |
if (me->error_html == YES) |
if (me->error_html == YES) |
{ /* and we want to print errors */ |
{ /* and we want to print errors */ |
if (me->error_stream_size == 0) /* and the stream is empty */ |
if (me->error_stream_size == 0) /* and the stream is empty */ |
AHTError_MemPrint (request); /* copy errors from the error stack |
AHTError_MemPrint (request); /* copy errors from the error stack |
** into a data structure */ |
** into a data structure */ |
if (me->error_stream) |
if (me->error_stream) |
{ /* if the stream is non-empty */ |
{ /* if the stream is non-empty */ |
fprintf (me->output, me->error_stream); /* output the errors */ |
fprintf (me->output, me->error_stream); /* output the errors */ |
status = HT_LOADED; /* show it in the HTML window */ |
error_flag = FALSE; /* show it in the HTML window */ |
} |
} |
else |
else |
me->reqStatus = HT_ERR; /* we did not get an error msg, |
me->reqStatus = HT_ERR; /* we did not get an error msg, |
Line 634 int status;
|
Line 640 int status;
|
else |
else |
me->reqStatus = HT_ERR; /* we don't want to print the error */ |
me->reqStatus = HT_ERR; /* we don't want to print the error */ |
} /* if error_stack */ |
} /* if error_stack */ |
} /* if it isn't an abort */ |
} /* if != HT_ABORT */ |
fclose (me->output); |
fclose (me->output); |
} |
} |
else |
else |
{ |
{ |
/* We must be doing a PUT. Verify if there was an error */ |
/* We must be doing a PUT. Verify if there was an error */ |
if (status != HT_LOADED) |
if (error_flag) |
me->reqStatus = HT_ERR; |
me->reqStatus = HT_ERR; |
} /* if me-output */ |
} /* if me-output */ |
|
|
/* setup the request status and invoke the cbf */ |
/* setup the request status and invoke the cbf */ |
Line 649 int status;
|
Line 655 int status;
|
/* work to be done: verify if we can put join all the terminate cbf in |
/* work to be done: verify if we can put join all the terminate cbf in |
only one call after the following lines */ |
only one call after the following lines */ |
|
|
if (status == HT_LOADED && me->reqStatus != HT_ERR |
if (!error_flag && me->reqStatus != HT_ERR |
&& me->reqStatus != HT_ABORT) |
&& me->reqStatus != HT_ABORT) |
{ |
{ |
me->reqStatus = HT_END; /* no errors */ |
me->reqStatus = HT_END; /* no errors */ |
Line 681 int status;
|
Line 687 int status;
|
me->outputfile[0] = EOS; |
me->outputfile[0] = EOS; |
} |
} |
} |
} |
else if (status != HT_LOADED && |
else if (error_flag && |
(me->reqStatus == HT_BUSY || me->reqStatus == HT_WAITING)) |
(me->reqStatus == HT_BUSY || me->reqStatus == HT_WAITING)) |
{ |
{ |
/* there was an error */ |
/* there was an error */ |