Browse Source

SSM: Silence JSON parse error message for HTTP POST and TLS attempts

Luke Dashjr 11 years ago
parent
commit
c10c5f4217
1 changed files with 1 additions and 1 deletions
  1. 1 1
      driver-stratum.c

+ 1 - 1
driver-stratum.c

@@ -486,7 +486,7 @@ bool stratumsrv_process_line(struct bufferevent * const bev, const char * const
 	json = JSON_LOADS(ln, &jerr);
 	json = JSON_LOADS(ln, &jerr);
 	if (!json)
 	if (!json)
 	{
 	{
-		if (strncmp(ln, "GET ", 4))
+		if (strncmp(ln, "GET ", 4) && strncmp(ln, "POST ", 5) && ln[0] != '\x16' /* TLS handshake */)
 			applog(LOG_ERR, "SSM: JSON parse error: %s", ln);
 			applog(LOG_ERR, "SSM: JSON parse error: %s", ln);
 		return false;
 		return false;
 	}
 	}