The attached patch fixes ns_adp_break, it differs from the previous
patch by one line in adpeval.c
tom jackson
On Sat, 2009-04-04 at 16:25 -0500, Andrew Steets wrote:
> Hi Tom,
>
> Attachments seem to work ok on this list.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
<[email protected]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.
t...@boron:~/cvs/aolserver/aolserver/nsd$ diff -u adpeval.c /web/tnt/aolserver/aolserver/nsd/adpeval.c
--- adpeval.c 2008-06-10 17:23:02.000000000 -0700
+++ /web/tnt/aolserver/aolserver/nsd/adpeval.c 2009-04-05 10:43:01.000000000 -0700
@@ -1017,7 +1017,12 @@
break;
case ADP_RETURN:
itPtr->adp.exception = ADP_OK;
- /* FALLTHROUGH */
+ result = TCL_OK;
+ break;
+ case ADP_ABORT:
+ case ADP_BREAK:
+ result = TCL_ERROR;
+ break;
default:
result = TCL_OK;
break;
t...@boron:~/cvs/aolserver/aolserver/nsd$ diff -u adprequest.c /web/tnt/aolserver/aolserver/nsd/adprequest.c
--- adprequest.c 2008-06-10 17:23:02.000000000 -0700
+++ /web/tnt/aolserver/aolserver/nsd/adprequest.c 2009-04-04 09:33:00.000000000 -0700
@@ -154,9 +154,15 @@
result = NsAdpInclude(itPtr, 2, objv, start, ttlPtr);
Tcl_DecrRefCount(objv[0]);
Tcl_DecrRefCount(objv[1]);
- if (NsAdpFlush(itPtr, 0) != TCL_OK || result != TCL_OK) {
- return NS_ERROR;
+ if ((result != TCL_OK) && (itPtr->adp.exception == ADP_OK)) {
+ itPtr->adp.exception = ADP_ABORT;
+ NsAdpFlush(itPtr, 0);
+ return NS_ERROR;
}
+ if (NsAdpFlush(itPtr, 0) != TCL_OK) {
+ return NS_ERROR;
+ }
+
return NS_OK;
}
@@ -216,6 +222,7 @@
Tcl_ResetResult(interp);
if (itPtr->adp.exception == ADP_ABORT) {
Tcl_SetResult(interp, "adp flush disabled: adp aborted", TCL_STATIC);
+ result = TCL_OK;
} else if (len == 0 && stream) {
result = TCL_OK;
} else {
t...@boron:~/cvs/aolserver/aolserver/nsd$ diff -u queue.c /web/tnt/aolserver/aolserver/nsd/queue.c
--- queue.c 2009-04-04 08:43:56.000000000 -0700
+++ /web/tnt/aolserver/aolserver/nsd/queue.c 2009-04-03 16:17:46.000000000 -0700
@@ -595,6 +595,13 @@
status = NsRunFilters(conn, NS_FILTER_POST_AUTH);
if (status == NS_OK) {
status = Ns_ConnRunRequest(conn);
+ if (status != NS_OK) {
+ Ns_ConnReturnInternalError(conn);
+ status = NS_OK; /* to allow tracing to happen */
+ }
+ } else {
+ Ns_ConnReturnInternalError(conn);
+ status = NS_FILTER_RETURN; /* to allow tracing to happen */
}
break;