Fixing client.c

Andrew Tridgell tridge at
Fri Sep 18 04:24:39 GMT 1998

> I have been working on rewriting parts of clitar.c to make it easier to
> understand and modify, and now want to fix client.c as we agreed a while ago.


there are two things to be done:

1) convert client.c to use clientgen.c and allow us to delete
   clientutil.c. This will certainly require that clientgen.c be
   expanded a bit because it doesn't have all the functions needed. 

2) add NT pipe calls that Luke added.

When doing (1) you will come across some weird bits of code that try
to optimise the use of chained open/read/close and readraw/readX for
lots of different situations. This stuff made smbclient fast but
ugly. I suggest you instead make the code really simple (just calling
a cli_read() and cli_write() function) and we can worry about client
optimisation later. 

Eventually we should add cli_open_read() and cli_read_close()
functions which will get the speed back, but it just isn't important
enough to do now and will make your job much harder.

oh, and don't try to do (1) and (2) at the same time. Leave a few days
between them for things to settle down :)
> That is, merge in the stuff that Luke did in the NTDOM branch some time ago.

It is more than a simple "merge" because Luke modified clientgen.c
quite a lot. That makes a hack-and-slash merge very difficult. You'll
need to instead work out what Lukes code did and take it across bit by
bit. It is probably a few days work.

> Can anyone tell me how to pull down the relevant stuff so I can merge it in?

you can get Lukes code like this:

cvs -d :pserver:cvs at login
Password: cvs
cvs -d :pserver:cvs at co -r BRANCH_NTDOM sambaold

More information about the samba-technical mailing list