From 872b821fca36bf543f2c3baf1296f25d1cb7e5a7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Nov 2005 11:10:40 +0000 Subject: r11636: a bit neater solution to the nt_cancel problem (This used to be commit ba7864b07eebecd4d4eb2ce515412a49964ae179) --- source4/libcli/raw/clitransport.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'source4/libcli/raw/clitransport.c') diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c index 6bf79ecfb0..1cd706f11e 100644 --- a/source4/libcli/raw/clitransport.c +++ b/source4/libcli/raw/clitransport.c @@ -105,6 +105,7 @@ struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock, packet_set_full_request(transport->packet, packet_full_request_nbt); packet_set_error_handler(transport->packet, smbcli_transport_error); packet_set_event_context(transport->packet, transport->socket->event.ctx); + packet_set_nofree(transport->packet); smbcli_init_signing(transport); @@ -559,16 +560,6 @@ void smbcli_transport_send(struct smbcli_request *req) return; } - /* put it on the socket queue - * - as the buffer is a part of the smbcli_request struct - * we need to reference it here, because packet_queue_run() - * will call talloc_free() on it - */ - if (!talloc_reference(req, req->out.buffer)) { - req->state = SMBCLI_REQUEST_ERROR; - req->status = NT_STATUS_NO_MEMORY; - return; - } blob = data_blob_const(req->out.buffer, req->out.size); status = packet_send(req->transport->packet, blob); if (!NT_STATUS_IS_OK(status)) { -- cgit