svn commit: samba r3304 - in branches/SAMBA_4_0/source: ldap_server lib/messaging lib/socket librpc/rpc rpc_server smb_server

tridge at samba.org tridge at samba.org
Thu Oct 28 04:00:44 GMT 2004


Author: tridge
Date: 2004-10-28 04:00:43 +0000 (Thu, 28 Oct 2004)
New Revision: 3304

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=3304&nolog=1

Log:
changed the API to lib/socket/ a little.  

The main change is to make socket_recv() take a pre-allocated buffer,
rather than allocating one itself. This allows non-blocking users of
this API to avoid a memcpy(). As a result our messaging code is now
about 10% faster, and the ncacn_ip_tcp and ncalrpc code is also
faster.

The second change was to remove the unused mem_ctx argument from
socket_send(). Having it there implied that memory could be allocated,
which meant the caller had to worry about freeing that memory (if for
example it is sending in a tight loop using the same memory
context). Removing that unused argument keeps life simpler for users.


Modified:
   branches/SAMBA_4_0/source/ldap_server/ldap_server.c
   branches/SAMBA_4_0/source/lib/messaging/messaging.c
   branches/SAMBA_4_0/source/lib/socket/socket.c
   branches/SAMBA_4_0/source/lib/socket/socket.h
   branches/SAMBA_4_0/source/lib/socket/socket_ipv4.c
   branches/SAMBA_4_0/source/lib/socket/socket_unix.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c
   branches/SAMBA_4_0/source/rpc_server/dcerpc_sock.c
   branches/SAMBA_4_0/source/smb_server/request.c
   branches/SAMBA_4_0/source/smb_server/smb_server.c


Changeset:
Sorry, the patch is too large (547 lines) to include; please use WebSVN to see it!
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=3304&nolog=1


More information about the samba-cvs mailing list