Commit 7fd6bbce authored by unknown's avatar unknown

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.


ndb/include/util/OutputStream.hpp:
  rename timeout in SocketOutputStream to reflect units (ms)
ndb/src/common/util/OutputStream.cpp:
  rename timeout in SocketOutputStream to reflect units (ms)
parent a3dc06a8
......@@ -42,10 +42,10 @@ public:
class SocketOutputStream : public OutputStream {
NDB_SOCKET_TYPE m_socket;
unsigned m_timeout;
unsigned m_timeout_ms;
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 println(const char * fmt, ...);
};
......
......@@ -42,16 +42,16 @@ FileOutputStream::println(const char * fmt, ...){
}
SocketOutputStream::SocketOutputStream(NDB_SOCKET_TYPE socket,
unsigned timeout){
unsigned write_timeout_ms){
m_socket = socket;
m_timeout = timeout;
m_timeout_ms = write_timeout_ms;
}
int
SocketOutputStream::print(const char * fmt, ...){
va_list ap;
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);
return ret;
}
......@@ -59,7 +59,7 @@ int
SocketOutputStream::println(const char * fmt, ...){
va_list ap;
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);
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