WL#3704 mgmapi timeouts (and cleanups)

indicate units in SocketOutputStream timeout

rename timeout in SocketOutputStream to reflect units (ms)

In 5.0 as well as is safe cleanup patch that will help with merging.
parent 088b3855
...@@ -42,9 +42,9 @@ public: ...@@ -42,9 +42,9 @@ public:
class SocketOutputStream : public OutputStream { class SocketOutputStream : public OutputStream {
NDB_SOCKET_TYPE m_socket; NDB_SOCKET_TYPE m_socket;
unsigned m_timeout; unsigned m_timeout_ms;
public: public:
SocketOutputStream(NDB_SOCKET_TYPE socket, unsigned writeTimeout = 1000); SocketOutputStream(NDB_SOCKET_TYPE socket, unsigned write_timeout_ms = 1000);
int print(const char * fmt, ...); int print(const char * fmt, ...);
int println(const char * fmt, ...); int println(const char * fmt, ...);
......
...@@ -42,16 +42,16 @@ FileOutputStream::println(const char * fmt, ...){ ...@@ -42,16 +42,16 @@ FileOutputStream::println(const char * fmt, ...){
} }
SocketOutputStream::SocketOutputStream(NDB_SOCKET_TYPE socket, SocketOutputStream::SocketOutputStream(NDB_SOCKET_TYPE socket,
unsigned timeout){ unsigned write_timeout_ms){
m_socket = socket; m_socket = socket;
m_timeout = timeout; m_timeout_ms = write_timeout_ms;
} }
int int
SocketOutputStream::print(const char * fmt, ...){ SocketOutputStream::print(const char * fmt, ...){
va_list ap; va_list ap;
va_start(ap, fmt); va_start(ap, fmt);
const int ret = vprint_socket(m_socket, m_timeout, fmt, ap); const int ret = vprint_socket(m_socket, m_timeout_ms, fmt, ap);
va_end(ap); va_end(ap);
return ret; return ret;
} }
...@@ -59,7 +59,7 @@ int ...@@ -59,7 +59,7 @@ int
SocketOutputStream::println(const char * fmt, ...){ SocketOutputStream::println(const char * fmt, ...){
va_list ap; va_list ap;
va_start(ap, fmt); va_start(ap, fmt);
const int ret = vprintln_socket(m_socket, m_timeout, fmt, ap); const int ret = vprintln_socket(m_socket, m_timeout_ms, fmt, ap);
va_end(ap); va_end(ap);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment