Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
struct server_id src,
DATA_BLOB *data)
{
- char *report;
+ char *report = NULL;
+ int iov_size = 0;
+ struct iovec iov[1];
SMB_ASSERT(msg_type == MSG_REQ_POOL_USAGE);
DEBUG(2,("Got POOL_USAGE\n"));
report = talloc_report_str(msg_ctx, NULL);
-
if (report != NULL) {
- messaging_send_buf(msg_ctx, src, MSG_POOL_USAGE,
- (uint8_t *)report,
- talloc_get_size(report)-1);
+ iov[iov_size].iov_base = report;
+ iov[iov_size].iov_len = talloc_get_size(report) - 1;
+ iov_size++;
+ }
+
+ if (iov_size) {
+ messaging_send_iov(msg_ctx,
+ src,
+ MSG_POOL_USAGE,
+ iov,
+ iov_size,
+ NULL,
+ 0);
}
- talloc_free(report);
+ TALLOC_FREE(report);
}
/**