Thanks for the fast response. It seems I have no other errors than the -996. My connection is finalized, but still I get this error while I think I have more than enough RAM available. Can it have something to do with the send or receive buffers? I don’t send large amounts of data, just small amounts. The error seems to be triggered after a few connections.
http_ClientCtx.HttpDataCh = wip_getFileOpts(
http_ClientCtx.HttpCnxCh,
url,
HttpDataHandler,
&http_ClientCtx,
WIP_COPT_HTTP_METHOD, WIP_HTTP_METHOD_POST,
WIP_COPT_HTTP_HEADER, "Accept", "text/html",
WIP_COPT_HTTP_HEADER, "From", "Test@test.com",
WIP_COPT_HTTP_HEADER, "Content-Type", "application/x-www-form-urlencoded",
WIP_COPT_FINALIZER, CheckFinalizer,
WIP_COPT_END);
if (http_ClientCtx.HttpDataCh == NULL){
TRACE((3, "Cannot create http data channel" ));
wip_close( http_ClientCtx.HttpCnxCh);
ret =-1;
}else{
TRACE((3, "Created HTTP data channel" ));
}
static void CheckFinalizer( void *ctx ) {
TRACE((3, "HttpDataHandler: Channel finalized"));
}
Within HttpDataHandler:
case WIP_CEV_ERROR:
// error
TRACE((3, "HttpDataHandler: WIP_CEV_ERROR %d\n",
ev->content.error.errnum));
adl_atSendResponse ( ADL_AT_UNS, "HttpDataHandler: ERROR\r\n" );
wip_close( ev->channel);
break;
case WIP_CEV_PEER_CLOSE:
CloseFB = wip_close( ev->channel);// data channel close
if(CloseFB == 0){
TRACE((3,"Cev Closed"));
}else{
TRACE((3,"Close Error, %d", CloseFB));
}
This is my TRACE feedback:
2012/07/05;11:13:08:583;001;ADL;3;Cev Closed
2012/07/05;11:13:08:590;001;ADL;3;HttpDataHandler: Channel finalized
2012/07/05;11:13:21:623;001;ADL;3;Created HTTP data channel
2012/07/05;11:13:21:728;001;ADL;3;HttpDataHandler: WIP_CEV_ERROR -996<LF>
2012/07/05;11:13:21:732;001;ADL;3;HttpDataHandler: Channel finalized