proposal: libsmbclient functionality addition
abartlet at samba.org
Wed Jun 19 06:56:41 GMT 2002
Tom Jansen wrote:
> > > and make all the functions use current_handle as the handle.
> > NO.
> > Please NO. I *really* would like to see this move in the opposite
> > direction - with all function taking a context and using it. It
> > *really* isn't that hard to change and it eliminates all sorts of
> > bugs.
> Alright, I can see your point. I personally don't mind to change the interface.
> I'll get working on at it right away if Richard approves too. I assume this will
> be samba3.0 stuff so no backporting to the stable branch is necessary (at least
> not yet).
The (hopefully) last 2.2 has been kicked out the door, so 3.0 it is (or
> The way it will be if I'm understanding you correctly is:
> All functions that instantiate a connection (open, opendir, fstat, etc) get the
> handle as their first arg. All other functions that work on fd's keep
> functioning the same.
I would really like to take this to its full conclusion, which also
allows old code to function and the new code to be compleatly modular.
> The fd-table stays global (to simplify the uniqueness of
> fd's) as well as the server-connection table (same reason).
Again, global stuff sucks. Why do we have 'file descriptors' anyway.
We can't read() or write() to them, so why not pass aound pointers to
objects and store the stuff you need there - much better than magic
> server-connection-cache will become on a per-handle basis so each handle has
> their private connections with unique server_fd's.
> > If you want to know the kind of code I like, see the passdb subsystem.
> That is my kind of "nice" code too.
Andrew Bartlett abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
More information about the samba-technical