aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Bouclet2017-09-24 08:24:40 +0200
committerBastien Bouclet2017-09-24 08:24:40 +0200
commit4890dd446667c929e2bcc58af08fe39918bb6854 (patch)
tree49e848bcbf8624cb6bcd219504d3930dc4de9afe
parent25d66b2a08f6a1ad09c7ad7dc9db11ad3a4c76cf (diff)
downloadscummvm-rg350-4890dd446667c929e2bcc58af08fe39918bb6854.tar.gz
scummvm-rg350-4890dd446667c929e2bcc58af08fe39918bb6854.tar.bz2
scummvm-rg350-4890dd446667c929e2bcc58af08fe39918bb6854.zip
NETWORKING: Fix mismatched curl callback declaration and definition
-rw-r--r--backends/networking/curl/networkreadstream.cpp2
-rw-r--r--backends/networking/curl/networkreadstream.h7
2 files changed, 4 insertions, 5 deletions
diff --git a/backends/networking/curl/networkreadstream.cpp b/backends/networking/curl/networkreadstream.cpp
index d3859cebc2..20488401dd 100644
--- a/backends/networking/curl/networkreadstream.cpp
+++ b/backends/networking/curl/networkreadstream.cpp
@@ -50,7 +50,7 @@ size_t NetworkReadStream::curlHeadersCallback(char *d, size_t n, size_t l, void
return 0;
}
-int NetworkReadStream::curlProgressCallback(void *p, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow) {
+static int curlProgressCallback(void *p, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow) {
NetworkReadStream *stream = (NetworkReadStream *)p;
if (stream)
stream->setProgress(dlnow, dltotal);
diff --git a/backends/networking/curl/networkreadstream.h b/backends/networking/curl/networkreadstream.h
index c0ed5ee1c6..b83ab27400 100644
--- a/backends/networking/curl/networkreadstream.h
+++ b/backends/networking/curl/networkreadstream.h
@@ -63,13 +63,9 @@ class NetworkReadStream: public Common::ReadStream {
*/
uint32 addResponseHeaders(char *buffer, uint32 bufferSize);
- /** Used in curl progress callback to pass current downloaded/total values. */
- void setProgress(uint64 downloaded, uint64 total);
-
static size_t curlDataCallback(char *d, size_t n, size_t l, void *p);
static size_t curlReadDataCallback(char *d, size_t n, size_t l, void *p);
static size_t curlHeadersCallback(char *d, size_t n, size_t l, void *p);
- static int curlProgressCallback(void *p, long dltotal, long dlnow, long ultotal, long ulnow);
static int curlProgressCallbackOlder(void *p, double dltotal, double dlnow, double ultotal, double ulnow);
public:
/** Send <postFields>, using POST by default. */
@@ -142,6 +138,9 @@ public:
/** Returns a number in range [0, 1], where 1 is "complete". */
double getProgress() const;
+
+ /** Used in curl progress callback to pass current downloaded/total values. */
+ void setProgress(uint64 downloaded, uint64 total);
};
} // End of namespace Networking