diff options
author | George Hazan <george.hazan@gmail.com> | 2013-11-10 21:43:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-11-10 21:43:18 +0000 |
commit | 530102b3b16fdc6f008cdf312e5977a878f295db (patch) | |
tree | 3159eb3d5712151a33d796b7a0039ae9a4d00e09 /plugins/FTPFileYM/curl/lib/progress.c | |
parent | e40ecc70a7db28bdf78dad5d804e07d08a77159c (diff) |
libcurl update
git-svn-id: http://svn.miranda-ng.org/main/trunk@6864 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FTPFileYM/curl/lib/progress.c')
-rw-r--r-- | plugins/FTPFileYM/curl/lib/progress.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/plugins/FTPFileYM/curl/lib/progress.c b/plugins/FTPFileYM/curl/lib/progress.c index 4cff2b76ec..dac7f8d6ec 100644 --- a/plugins/FTPFileYM/curl/lib/progress.c +++ b/plugins/FTPFileYM/curl/lib/progress.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -357,12 +357,21 @@ int Curl_pgrsUpdate(struct connectdata *conn) } /* Calculations end */ if(!(data->progress.flags & PGRS_HIDE)) { - /* progress meter has not been shut off */ - if(data->set.fprogress) { - /* There's a callback set, so we call that instead of writing - anything ourselves. This really is the way to go. */ + if(data->set.fxferinfo) { + /* There's a callback set, call that */ + result= data->set.fxferinfo(data->set.progress_client, + data->progress.size_dl, + data->progress.downloaded, + data->progress.size_ul, + data->progress.uploaded); + if(result) + failf(data, "Callback aborted"); + return result; + } + else if(data->set.fprogress) { + /* The older deprecated callback is set, call that */ result= data->set.fprogress(data->set.progress_client, (double)data->progress.size_dl, (double)data->progress.downloaded, |