Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions cf-testd/cf-testd.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <mutex.h> // ThreadLock
#include <net.h>
#include <openssl/err.h> // ERR_get_error
#include <patch_stream.h> // PatchStreamServe
#include <policy_server.h> // PolicyServerReadFile
#include <printsize.h> // PRINTSIZE
#include <server_access.h> // acl_Free
Expand Down Expand Up @@ -417,15 +416,11 @@ static bool CFTestD_BusyLoop(
break;
}

/* cf-testd has no leech2 state; serve an empty patch so that the
* hub's GETPATCH request succeeds. */
Log(LOG_LEVEL_INFO, "Serving empty leech2 patch");
if (PatchStreamServe(ConnectionInfoSSL(conn->conn_info), "", 0))
{
return true;
}

break;
/* Serve the patch using the same enterprise code path as cf-serverd.
* In a pure core build the stub refuses; with the enterprise plugin
* loaded a real leech2 patch is served from the state directory.
* Keep the connection open on success. */
return ServeLeech2Patch(conn, last_hash);
}
case PROTOCOL_COMMAND_BAD:
default:
Expand Down
Loading