IWEBRESP_GetInfo() Failing | developer.brewmp.com IWEBRESP_GetInfo() Failing | developer.brewmp.com

Developer

IWEBRESP_GetInfo() Failing

Forums:

Hi,

My application is crashing right after the callback function is triggered when it makes a web call. Here is the important snippet of my code. The call is being made properly to the server and pWebResp has a valid address just prior to crashing at the last line of code down there. Wondered if anyone had experienced a similar problem.

Quote:boolean SendRequest(Https *pMe)
{
int postLen;

postLen = STRLEN(pMe->postData) * sizeof(char);
if(ISOURCEUTIL_SourceFromMemory(pMe->pSourceUtil, pMe->postData, postLen, NULL, NULL, &pMe->pSource) != SUCCESS)
return FALSE;

IWEB_GetResponse(pMe->pWeb,(pMe->pWeb,&pMe->pWebResp,&pMe->cb,pMe->url,
WEBOPT_HEADER, "Content-Type: text/xml; charset=utf-8",
WEBOPT_METHOD,"POST",
WEBOPT_BODY, pMe->pSource,
WEBOPT_CONTENTLENGTH, postLen,
WEBOPT_DEFAULTS, pMe->pWebOpts,
WEBOPT_END));
return TRUE;

void CallBack(Https *pMe)
{
int ByteCount;
ISource *pSource;

pMe->pWebRespInfo = IWEBRESP_GetInfo(pMe->pWebResp); //Crash

did you reset pMe->url or or did you clean IWEB* by mistake?

did you reset pMe->url or or did you clean IWEB* by mistake?

1) I assume that pMe->pSourceUtil has been setup correctly.
2) Your header should be in the pMe struct and end with "\r\n".
3) You have done a "CALLBACK_Init(&pMe->m_cb, WebReadCB, pMe);" where WebReadCB is your callback routine defined as "static void WebReadCB(void* cxt)"

1) I assume that pMe->pSourceUtil has been setup correctly.
2) Your header should be in the pMe struct and end with "\r\n".
3) You have done a "CALLBACK_Init(&pMe->m_cb, WebReadCB, pMe);" where WebReadCB is your callback routine defined as "static void WebReadCB(void* cxt)"