move verbose socket logging out of socket driver

the way it's used, it's more of a high-level function.
This commit is contained in:
Oswald Buddenhagen 2013-12-08 16:32:30 +01:00
parent 0b32734693
commit 27fa63a577
2 changed files with 8 additions and 4 deletions

View File

@ -701,6 +701,10 @@ parse_imap_list( imap_store_t *ctx, char **sp, parse_list_state_t *sts )
getline:
if (!(s = socket_read_line( &ctx->conn )))
goto postpone;
if (DFlags & VERBOSE) {
puts( s );
fflush( stdout );
}
} else if (*s == '"') {
/* quoted string */
s++;
@ -1162,6 +1166,10 @@ imap_socket_read( void *aux )
}
if (!(cmd = socket_read_line( &ctx->conn )))
return;
if (DFlags & VERBOSE) {
puts( cmd );
fflush( stdout );
}
arg = next_arg( &cmd );
if (!arg) {

View File

@ -591,10 +591,6 @@ socket_read_line( conn_t *b )
if (p != s && p[-1] == '\r')
p--;
*p = 0;
if (DFlags & VERBOSE) {
puts( s );
fflush( stdout );
}
return s;
}