Current location: Hot Scripts Forums » Programming Languages » C/C++ » Curl Issue..........


Curl Issue..........

Reply
  #1 (permalink)  
Old 07-19-11, 12:21 AM
sumukh sumukh is offline
New Member
 
Join Date: Jul 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question 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


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 + post + cookies naissa PHP 1 08-30-09 06:36 AM
PHP Curl horeru_tenshi PHP 4 05-14-09 07:02 AM
[SOLVED] PHP AJAX and IE disabled option issue Dan Man PHP 1 08-26-08 02:34 PM
Issue Tracking and Task management SlackeR Script Requests 8 10-05-05 04:29 PM
Language issue in from property, Please Help AskAR ASP 0 08-10-05 06:40 AM


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