mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-13 23:57:14 +03:00
refactor: make probe_buffer hexdump input
This commit is contained in:
parent
41e3b0cd1d
commit
09597bfa42
9
probe.c
9
probe.c
@ -328,6 +328,11 @@ int probe_buffer(char* buf, int len, struct sslhcfg_protocols_item** proto)
|
||||
struct sslhcfg_protocols_item* p;
|
||||
int i, res, again = 0;
|
||||
|
||||
if (cfg.verbose > 1) {
|
||||
fprintf(stderr, "hexdump of incoming packet:\n");
|
||||
hexdump(buf, len);
|
||||
}
|
||||
|
||||
*proto = NULL;
|
||||
for (i = 0; i < cfg.protocols_len; i++) {
|
||||
char* probe_str[3] = {"PROBE_NEXT", "PROBE_MATCH", "PROBE_AGAIN"};
|
||||
@ -384,10 +389,6 @@ int probe_client_protocol(struct connection *cnx)
|
||||
* connection will just fail later normally). */
|
||||
|
||||
if (n > 0) {
|
||||
if (cfg.verbose > 1) {
|
||||
fprintf(stderr, "hexdump of incoming packet:\n");
|
||||
hexdump(buffer, n);
|
||||
}
|
||||
defer_write(&cnx->q[1], buffer, n);
|
||||
return probe_buffer(cnx->q[1].begin_deferred_data,
|
||||
cnx->q[1].deferred_data_size,
|
||||
|
Loading…
x
Reference in New Issue
Block a user