Commit d36be343 authored by unknown's avatar unknown

Bug#30366 (recommit) NDB fails to start on OS X, PPC, 64 bit

- The errno variable should only be used when the previous socket
  write failed, it should be regarded as undefined at other times

parent 25d59622
...@@ -62,7 +62,7 @@ SocketOutputStream::print(const char * fmt, ...){ ...@@ -62,7 +62,7 @@ SocketOutputStream::print(const char * fmt, ...){
if(ret >= 0) if(ret >= 0)
m_timeout_remain-=time; m_timeout_remain-=time;
if(errno==ETIMEDOUT || m_timeout_remain<=0) if((ret < 0 && errno==ETIMEDOUT) || m_timeout_remain<=0)
{ {
m_timedout= true; m_timedout= true;
ret= -1; ret= -1;
...@@ -84,7 +84,7 @@ SocketOutputStream::println(const char * fmt, ...){ ...@@ -84,7 +84,7 @@ SocketOutputStream::println(const char * fmt, ...){
if(ret >= 0) if(ret >= 0)
m_timeout_remain-=time; m_timeout_remain-=time;
if (errno==ETIMEDOUT || m_timeout_remain<=0) if ((ret < 0 && errno==ETIMEDOUT) || m_timeout_remain<=0)
{ {
m_timedout= true; m_timedout= true;
ret= -1; ret= -1;
......
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