diff options
author | Simon Rettberg | 2017-10-24 22:29:05 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-10-24 22:29:05 +0200 |
commit | c660f531fb4bd9b7f9e108541324be36cb5f4012 (patch) | |
tree | 2fe99eaac0c22b3b8ffc4e54d90ec6df8e614ca6 | |
parent | [FUSE] Fix type mismatch warnings (diff) | |
download | dnbd3-c660f531fb4bd9b7f9e108541324be36cb5f4012.tar.gz dnbd3-c660f531fb4bd9b7f9e108541324be36cb5f4012.tar.xz dnbd3-c660f531fb4bd9b7f9e108541324be36cb5f4012.zip |
[FUSE] Spacing; Don't check if server proto is newer than client
The server is always backwards compatible, and so should be the
client. If support for an older version will not be kept up,
MIN_SUPPORTED_{CLIENT,SERVER} will be increased accordingly
so that the connection is dropped.
-rw-r--r-- | src/fuse/connection.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fuse/connection.c b/src/fuse/connection.c index 29ac2de..f2befae 100644 --- a/src/fuse/connection.c +++ b/src/fuse/connection.c @@ -199,7 +199,7 @@ uint64_t connection_getImageSize() bool connection_read(dnbd3_async_t *request) { - if (!connectionInitDone) return false; + if ( !connectionInitDone ) return false; pthread_mutex_lock( &connection.sendMutex ); enqueueRequest( request ); if ( connection.sockFd != -1 ) { @@ -296,7 +296,7 @@ static void* connection_receiveThreadMain(void *sockPtr) { int sockFd = (int)(size_t)sockPtr; dnbd3_reply_t reply; - pthread_detach(pthread_self()); + pthread_detach( pthread_self() ); while ( keepRunning ) { int ret; @@ -502,7 +502,7 @@ static void probeAltServers() logadd( LOG_DEBUG1, "<- select fail" ); goto fail; } - if ( remoteProto < MIN_SUPPORTED_SERVER || remoteProto > PROTOCOL_VERSION ) { + if ( remoteProto < MIN_SUPPORTED_SERVER ) { logadd( LOG_WARNING, "Unsupported remote version (local: %d, remote: %d)", (int)PROTOCOL_VERSION, (int)remoteProto ); srv->consecutiveFails += 10; goto fail; |