cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Sending SOAP query using CURLOPT_POST not working for me

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 4 Jan 2010 19:39:45 +0100 (CET)

On Mon, 4 Jan 2010, nitin.mittal_at_rsa.com wrote:

> struct MemoryStruct *bodyStruct=NULL;

... a global pointer pointing to NULL.

> size_t WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void
> *data)
> {
> register int realsize = size * nmemb;
> struct MemoryStruct *mem = (struct MemoryStruct *)data;
>
> mem->memory = (char *)realloc(mem->memory, mem->size + realsize
> + 1); // Application crashes here.

Well yes, as 'mem' is NULL...

> curl_easy_setopt(ch, CURLOPT_FILE, bodyStruct);

... as set here.

> Also, I have kept the lines, I am not sure about, in bold.

Not really, my mail is text only and bold doesn't do well in text-only...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-04