diff options
author | Simon Rettberg | 2015-12-12 14:29:44 +0100 |
---|---|---|
committer | Simon Rettberg | 2015-12-12 14:29:44 +0100 |
commit | b423733b2614946d2a7cf80ee877f4ad5ca11c64 (patch) | |
tree | 05d0267632db3b71bee30ba044c8602b7ec82496 /src/server/uplink.c | |
parent | [SERVER] Nullpad images virtually at runtime instead of padding the actual file (diff) | |
download | dnbd3-b423733b2614946d2a7cf80ee877f4ad5ca11c64.tar.gz dnbd3-b423733b2614946d2a7cf80ee877f4ad5ca11c64.tar.xz dnbd3-b423733b2614946d2a7cf80ee877f4ad5ca11c64.zip |
[SERVER] Support looking on disk if an unknown image is requested
Diffstat (limited to 'src/server/uplink.c')
-rw-r--r-- | src/server/uplink.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/uplink.c b/src/server/uplink.c index 3ed2ef5..7fa3c96 100644 --- a/src/server/uplink.c +++ b/src/server/uplink.c @@ -281,10 +281,6 @@ static void* uplink_mainloop(void *data) const int fd = link->fd; link->fd = link->betterFd; if ( fd != -1 ) close( fd ); - // If we don't have a crc32 list yet, see if the new server has one - if ( link->image->crc32 == NULL ) { - uplink_addCrc32( link ); - } link->betterFd = -1; link->currentServer = link->betterServer; link->replicationHandle = 0; @@ -294,6 +290,10 @@ static void* uplink_mainloop(void *data) logadd( LOG_DEBUG1, "(Uplink %s) Now connected to %s\n", link->image->lower_name, buffer + 1 ); setThreadName( buffer ); } + // If we don't have a crc32 list yet, see if the new server has one + if ( link->image->crc32 == NULL ) { + uplink_addCrc32( link ); + } // Re-send all pending requests uplink_sendRequests( link, false ); uplink_sendReplicationRequest( link ); |