libidav/resource.c

changeset 355
5da2cf15eb44
parent 354
067ea2315a8a
child 361
b6f2462ee055
equal deleted inserted replaced
354:067ea2315a8a 355:5da2cf15eb44
763 curl_easy_setopt(handle, CURLOPT_UPLOAD, 0L); 763 curl_easy_setopt(handle, CURLOPT_UPLOAD, 0L);
764 764
765 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, write_fnc); 765 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, write_fnc);
766 curl_easy_setopt(handle, CURLOPT_WRITEDATA, stream); 766 curl_easy_setopt(handle, CURLOPT_WRITEDATA, stream);
767 767
768 if(sn->get_progress) {
769 curl_easy_setopt(handle, CURLOPT_XFERINFOFUNCTION, dav_session_get_progress);
770 curl_easy_setopt(handle, CURLOPT_XFERINFODATA, res);
771 curl_easy_setopt(handle, CURLOPT_NOPROGRESS, 0L);
772 }
773
768 long status = 0; 774 long status = 0;
769 CURLcode ret = dav_session_curl_perform(sn, &status); 775 CURLcode ret = dav_session_curl_perform(sn, &status);
776
777 if(sn->get_progress) {
778 curl_easy_setopt(handle, CURLOPT_XFERINFOFUNCTION, NULL);
779 curl_easy_setopt(handle, CURLOPT_XFERINFODATA, NULL);
780 curl_easy_setopt(handle, CURLOPT_NOPROGRESS, 1L);
781 }
770 782
771 char *hash = NULL; 783 char *hash = NULL;
772 if(dec) { 784 if(dec) {
773 aes_decrypter_shutdown(dec); // get final bytes 785 aes_decrypter_shutdown(dec); // get final bytes
774 786

mercurial