From 3ebb066aba7249bc85d4fd6adebe48eb543719a7 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 28 Jan 2017 18:26:12 +0100 Subject: [PATCH] make -DN print also the sent data --- src/drv_imap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/drv_imap.c b/src/drv_imap.c index 1fa727f..3d66243 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -302,6 +302,12 @@ send_imap_cmd( imap_store_t *ctx, struct imap_cmd *cmd ) iov[0].len = bufl; iov[0].takeOwn = KeepOwn; if (litplus) { + if (DFlags & DEBUG_NET_ALL) { + printf( "%s>>>>>>>>>\n", ctx->label ); + fwrite( cmd->param.data, cmd->param.data_len, 1, stdout ); + printf( "%s>>>>>>>>>\n", ctx->label ); + fflush( stdout ); + } iov[1].buf = cmd->param.data; iov[1].len = cmd->param.data_len; iov[1].takeOwn = GiveOwn; @@ -1338,6 +1344,12 @@ imap_socket_read( void *aux ) if (cmdp->param.data) { if (cmdp->param.to_trash) ctx->trashnc = TrashKnown; /* Can't get NO [TRYCREATE] any more. */ + if (DFlags & DEBUG_NET_ALL) { + printf( "%s>>>>>>>>>\n", ctx->label ); + fwrite( cmdp->param.data, cmdp->param.data_len, 1, stdout ); + printf( "%s>>>>>>>>>\n", ctx->label ); + fflush( stdout ); + } iov[0].buf = cmdp->param.data; iov[0].len = cmdp->param.data_len; iov[0].takeOwn = GiveOwn;