cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTP client as new child process

From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Wed, 20 Feb 2013 14:31:06 +0100

On 02/20/2013 02:16 PM, Ajay Tanpure wrote:
> Hello,
>
> I want to read data from parent process through pipe. If i use the
> character pointer to read the data, then some garbage values are
> stored in the character array, but if i use character array of fixed
> length, then data is read as it is.
> This problem occurs when i use the libcurl functions.
>
> I am WriteCallback function to get responses from server and store in
> memory as given n example http://curl.haxx.se/libcurl/c/getinmemory.html
>
> The source code that I have attached, it is character pointer, working
> part i have commented out.
>
> Can anyone Please tell me what goes wrong when i am using character pointer.

This is a basic C programming issue. A character pointer must point
somewhere. You can't just declare a pointer and not assign it.

http://pw1.netcom.com/~tjensen/ptr/pointers.htm

Linus
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-20