[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-954-gbb7e6f0

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Feb 18 06:21:19 MST 2009


On Wed, Feb 18, 2009 at 02:06:02PM +0100, Stefan (metze) Metzmacher wrote:
> I'm in progress to fix the whole problem correctly, by fixing the socket
> abstraction. The function socket_get_fd() is stupid and breaks the
> abstraction.
> 
> The caller should give a tevent_context to the socket layer and
> callbacks for read and write, it's up to the socket layer how to trigger
> them. The packet.c code will also be obsoleted by a generic
> tsocket_send[to]_queue_send/recv() and tsocket_recv_pkt_send/recv() code.

While you're rewriting this: I'm not convinced that
statically attaching an event context and fd event to a
socket is necessarily a good idea. At least for me this has
in the past caused some confusion about the code path when
receiving something from the network. The way I've done it
in s3 so far is a bit different: The socket knows nothing
about event contexts, only requests trigger the creation of
an fd event. I know that this makes for example an oplock
break listener difficult, and you have to take care of
queueing at a higher level, but for me it is easier to
understand than an event context attached to the socket.

Just my 2ct :-)

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20090218/72f6f2a6/attachment.bin


More information about the samba-technical mailing list