From 8edc64288491433049e6606ba6c6bba280335d80 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Sat, 4 Jun 2016 21:04:48 +0200 Subject: [PATCH 1/2] Fixed a typo. --- src/output/output.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output/output.cpp b/src/output/output.cpp index 72f1f30e..c9087b9c 100644 --- a/src/output/output.cpp +++ b/src/output/output.cpp @@ -142,7 +142,7 @@ namespace Mist { void Output::reconnect(){ thisPacket.null(); if (!Util::startInput(streamName)){ - FAIL_MSG("Opening stream %s failed - aborting initalization", streamName.c_str()); + FAIL_MSG("Opening stream %s failed - aborting initialization", streamName.c_str()); onFail(); return; } From cc93a8fa4e0187f1d41a5a8f02eae0f980873c79 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Mon, 6 Jun 2016 12:18:48 +0200 Subject: [PATCH 2/2] Socket internal data counters now 64 bits unsigned integers --- lib/socket.cpp | 4 ++-- lib/socket.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/socket.cpp b/lib/socket.cpp index dbad1fa2..6a6cf296 100644 --- a/lib/socket.cpp +++ b/lib/socket.cpp @@ -423,12 +423,12 @@ unsigned int Socket::Connection::connTime() { } /// Returns total amount of bytes sent. -unsigned int Socket::Connection::dataUp() { +uint64_t Socket::Connection::dataUp() { return up; } /// Returns total amount of bytes received. -unsigned int Socket::Connection::dataDown() { +uint64_t Socket::Connection::dataDown() { return down; } diff --git a/lib/socket.h b/lib/socket.h index c2b83740..633d6ab5 100644 --- a/lib/socket.h +++ b/lib/socket.h @@ -49,8 +49,8 @@ namespace Socket { int sock; ///< Internally saved socket number. int pipes[2]; ///< Internally saved file descriptors for pipe socket simulation. std::string remotehost; ///< Stores remote host address. - unsigned int up; - unsigned int down; + uint64_t up; + uint64_t down; long long int conntime; Buffer downbuffer; ///< Stores temporary data coming in. int iread(void * buffer, int len, int flags = 0); ///< Incremental read call. @@ -88,8 +88,8 @@ namespace Socket { void SendNow(const char * data, size_t len); ///< Will not buffer anything but always send right away. Blocks. //stats related methods unsigned int connTime();///< Returns the time this socket has been connected. - unsigned int dataUp(); ///< Returns total amount of bytes sent. - unsigned int dataDown(); ///< Returns total amount of bytes received. + uint64_t dataUp(); ///< Returns total amount of bytes sent. + uint64_t dataDown(); ///< Returns total amount of bytes received. std::string getStats(std::string C); ///< Returns a std::string of stats, ended by a newline. friend class Server; bool Error; ///< Set to true if a socket error happened.