You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2011/07/13 22:38:07 UTC
svn commit: r1146414 - /trafficserver/traffic/trunk/proxy/InkAPI.cc
Author: zwoop
Date: Wed Jul 13 20:38:07 2011
New Revision: 1146414
URL: http://svn.apache.org/viewvc?rev=1146414&view=rev
Log:
TS-875 TSFetchRestpGet(), TSFetchPageResptGet() and TSFetchUrl() have incorrect asserts
Author: Manjesh Nilange
At some point (up to you Manjesh) we might want to file an RFE to add
a data type for this, and change these (deprecate and make new) APIs.
We've already added a number of typedef's to make the type checking
better, so it'd make sense to do so for this API too.
Modified:
trafficserver/traffic/trunk/proxy/InkAPI.cc
Modified: trafficserver/traffic/trunk/proxy/InkAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPI.cc?rev=1146414&r1=1146413&r2=1146414&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPI.cc Wed Jul 13 20:38:07 2011
@@ -7104,9 +7104,7 @@ TSRedirectUrlGet(TSHttpTxn txnp, int *ur
char*
TSFetchRespGet(TSHttpTxn txnp, int *length)
{
- sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
sdk_assert(sdk_sanity_check_null_ptr((void*)length) == TS_SUCCESS);
-
FetchSM *fetch_sm = (FetchSM*)txnp;
return fetch_sm->resp_get(length);
}
@@ -7114,7 +7112,6 @@ TSFetchRespGet(TSHttpTxn txnp, int *leng
TSReturnCode
TSFetchPageRespGet(TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *obj)
{
- sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
sdk_assert(sdk_sanity_check_null_ptr((void*)bufp) == TS_SUCCESS);
sdk_assert(sdk_sanity_check_null_ptr((void*)obj) == TS_SUCCESS);
@@ -7152,7 +7149,9 @@ TSFetchPages(TSFetchUrlParams_t *params)
void
TSFetchUrl(const char* headers, int request_len, unsigned int ip, int port , TSCont contp, TSFetchWakeUpOptions callback_options,TSFetchEvent events)
{
- sdk_assert(sdk_sanity_check_continuation(contp) == TS_SUCCESS);
+ if (callback_options != NO_CALLBACK) {
+ sdk_assert(sdk_sanity_check_continuation(contp) == TS_SUCCESS);
+ }
FetchSM *fetch_sm = FetchSMAllocator.alloc();