#1 (permalink)  
Old 07-21-11, 12:02 AM
sumukh sumukh is offline
New Member
 
Join Date: Jul 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
curl issue...

Hi,
I am trying to download files whose size is greater than 2GB using curl API's like curl_easy_perform ( ) and curl_easy_setopt ( ) on linux and unix platforms using c++ language.

The problem is, the above functions are helping me to download upto 2GB file size and not more than that.
Here what i am doing is................I am calling the statement:
curl_easy_setopt(curlHandle_m, CURLOPT_WRITEFUNCTION, FileTransfer::CallBack);

Then, it calls the CallBack function which tries to download the file part by part in bytes into the destination place.But once the file reaches 2GB size it is not able to write the remaining data into the file.

Following is the Callback function:
size_t FileTransfer::CallBack(void *buffer, size_t size, size_t nmemb, void *stream) {

struct DownloadFileName *out = (struct DownloadFileName *) stream;
if (out && !out->stream) {

LOG_DEBUG(ACE_TEXT("While downloading file name as: %s\n"), out->filename);

// open file for writing
out->stream = ACE_OS::fopen(out->filename, "wb");

if (!out->stream) {

// Failure, can't open file to write
return CURLE_WRITE_ERROR;
}
}
return ACE_OS::fwrite(buffer, size, nmemb, out->stream);
}

So plz anyone help me regarding this issue......

Thanks,
Reply With Quote
Reply

Bookmarks

Tags
curl


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Curl Issue.......... sumukh C/C++ 0 07-19-11 12:21 AM
about cURL sunanurag PHP 1 02-04-10 07:37 AM
curl + post + cookies naissa PHP 1 08-30-09 06:36 AM
Issue Tracking and Task management SlackeR Script Requests 8 10-05-05 04:29 PM
Trying to get CURL to work.... End User PHP 0 04-06-05 11:11 PM


All times are GMT -5. The time now is 09:59 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.