diff --git a/src/sbbs3/ftpsrvr.c b/src/sbbs3/ftpsrvr.c index ec003933be768bcecf28c1c513127649993f9700..bf546b3985fc3da66a114b5971556d8e87ef8039 100644 --- a/src/sbbs3/ftpsrvr.c +++ b/src/sbbs3/ftpsrvr.c @@ -1243,6 +1243,7 @@ static void receive_thread(void* arg) thread_down(); } +// Returns TRUE upon error?!? static BOOL start_tls(SOCKET *sock, CRYPT_SESSION *sess, BOOL resp) { BOOL nodelay; @@ -2707,13 +2708,18 @@ static void ctrl_thread(void* arg) sockprintf(sock,sess,"534 Already in TLS mode"); continue; } - if (start_tls(&sock, &sess, TRUE)) + if (start_tls(&sock, &sess, TRUE)) { + lprintf(LOG_WARNING, "%04d <%s> failed to initialize TLS successfully", sock, host_ip); break; + } user.number=0; sysop=FALSE; filepos=0; got_pbsz = FALSE; protection = FALSE; + lprintf(LOG_INFO, "%04d <%s> initialized TLS successfully", sock, host_ip); + client.protocol = "FTPS"; + client_on(sock, &client, /* update: */TRUE); continue; } sockprintf(sock,sess,"504 TLS is the only AUTH supported");