]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
meta-plugin: Added extra debug about data size. Fixed hello plugin with latest parameters
authorJorge Gea <jorge.gea@baculasystems.com>
Fri, 23 Sep 2022 11:21:42 +0000 (13:21 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:59 +0000 (13:56 +0200)
bacula/src/plugins/fd/pluginlib/ptcomm.cpp

index 174e70e15c852fa8027ff2488f7a710c726a474b..22a84e727294b73b9e5c6c9b2af96eeab11ff497 100644 (file)
@@ -155,11 +155,13 @@ bool PTCOMM::recvbackend_data(bpContext *ctx, char *buf, int32_t nbytes)
 {
    int status;
    int rbytes = 0;
+   int ebytes = nbytes;
    struct timeval _timeout;
 
    _timeout.tv_sec = m_timeout > 0 ? m_timeout : PTCOMM_DEFAULT_TIMEOUT;
    _timeout.tv_usec = 0;
 
+
    while (nbytes > 0)
    {
       fd_set rfds;
@@ -228,6 +230,8 @@ bool PTCOMM::recvbackend_data(bpContext *ctx, char *buf, int32_t nbytes)
       }
    }
 
+   DMSG2(ctx, DDEBUG, "Data read. Expected=%d. Read=%d\n", ebytes, rbytes);
+
    return true;
 }
 
@@ -526,8 +530,8 @@ int32_t PTCOMM::handle_payload(bpContext *ctx, char *buf, int32_t nbytes)
       f_eod = f_error = f_fatal = true;
       return -1;
    }
-   char bindata[17];
-   DMSG1(ctx, DDEBUG, "RECV> %s\n", asciidump(buf, nbytes, bindata, 17));
+   char bindata[32];
+   DMSG1(ctx, DDEBUG, "RECV> %s\n", asciidump(buf, nbytes, bindata, 32));
 
    return nbytes;
 }