HACK no debug libcli/smb/smb_direct.c
authorStefan Metzmacher <metze@samba.org>
Thu, 29 Sep 2016 08:44:10 +0000 (10:44 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 1 Jun 2018 12:35:07 +0000 (14:35 +0200)
libcli/smb/smb_direct.c

index 2778ac344505848c36cdb0d383c7270212493c3e..7adce4ece62989731264d42315d395a3c00106eb 100644 (file)
@@ -196,6 +196,15 @@ static int smb_direct_io_destructor(struct smb_direct_io *io)
 
 static int smb_direct_connection_destructor(struct smb_direct_connection *c);
 
+#undef DEBUG
+#define DEBUG( _level, body ) do {\
+       int level = 5; \
+  (void)( ((level) <= MAX_DEBUG_LEVEL) && \
+         unlikely(DEBUGLEVEL_CLASS[ DBGC_CLASS ] >= (level))           \
+       && (dbghdrclass( level, DBGC_CLASS, __location__, __FUNCTION__ )) \
+       && (dbgtext body) ); \
+} while(0)
+
 struct smb_direct_connection *smb_direct_connection_create(TALLOC_CTX *mem_ctx)
 {
        struct smb_direct_connection *c;
@@ -1286,7 +1295,7 @@ static void smb_direct_connection_negotiate_connect_ibv_handler(struct tevent_co
        case IBV_WC_RECV:
                DEBUG(0,("%s:%s: GOT RECV[%p] next[%p] ret[%d] errno[%d]\n",
                        __location__, __FUNCTION__, io, io->recv_wr.next, ret, errno));
-               dump_data(0, io->data, wc.byte_len);
+               //dump_data(0, io->data, wc.byte_len);
                if (wc.byte_len < 0x20) {
                        status = NT_STATUS_INVALID_NETWORK_RESPONSE;
                        DEBUG(0,("%s:%s: ret[%d] errno[%d] status[%s]\n",
@@ -1746,7 +1755,7 @@ try_again:
                        return;
                }
                DLIST_REMOVE(c->r2s.posted, io);
-               dump_data(0, io->smbd_hdr, MIN(wc.byte_len, sizeof(io->smbd_hdr)));
+               //dump_data(0, io->smbd_hdr, MIN(wc.byte_len, sizeof(io->smbd_hdr)));
                credits_requested = SVAL(io->smbd_hdr, 0x00);
                if (credits_requested == 0) {
                        status = NT_STATUS_INVALID_NETWORK_RESPONSE;