bakatrouble / sys-screenuploader

GNU Lesser General Public License v3.0
71 stars 9 forks source link

fix the bug : curl_easy_perform() failed: out of memory #10

Open bao3 opened 3 years ago

bao3 commented 3 years ago

I use this app to upload pic&movies to my telegram , but it could just upload pic successfully , and it would fail to upload movies witch error messenge " curl_easy_perform() failed: out of memory"

+How to resove

I enabled some sysmodules :

sys-sftp-light sys-clk sys-screenuploader

I disable sys-ftp-light and sys-clk , then sys-scrrenuploader could upload mp4 file to telegram.

Then I re-enabled sys-ftp-light and sys-clk , the error remained . at last , I found , it couldnot run well while I enable more than 2 sysmodules.

At last ,I just enabled sys-clk and sys-screenuploader,and it could upload pics & moives to telegram.

I guess the error may be caused by the curl buffersize. I hope it to be fixed .

        curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
        curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
        curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 0x2000L);
        curl_easy_setopt(curl, CURLOPT_UPLOAD_BUFFERSIZE, 0x2000L);
        CURLcode res = curl_easy_perform(curl);
        fclose(f);