libsmbclient problems

Richard Sharpe rsharpe at ns.aus.com
Sun Nov 10 21:39:01 GMT 2002


On Sun, 10 Nov 2002, Mikael Albertsson wrote:

Mail reformatted!

> I'm having some weird problems trying to use libsmbclient in an 
> application I'm creating.
> 
> The thing is that I use smbc_read to read a file from another computer, 
> however, sometimes I get kicked and smbc_read ends prematurely with less 
> read than I requested. I thought "ok, I'lll just close it and try to 
> reopen", but if I try to use smbc_close on the fd, everything comes 
> crashing down in the blink of an eye.
> 
> Another weird thing is that most times errno is set to 104 (connection 
> reset by peer) after smbc_read ends like this, but sometimes errno is 0 
> (Success) after such a premature end...this baffles me, but I can work 
> around it.

OK, it would be very good to get a packet trace of what is happening on 
the wire when these errors occur.

You can get a packet trace with:

   tcpdump -i <dev>[1] -s 1500 -w libsmbc.cap

[1] Use the appropriate device, like eth0, xl0, depending on your OS and 
interface.

Then send the trace to me as an attachment.

Regards
-----
Richard Sharpe, rsharpe at ns.aus.com, rsharpe at samba.org, 
sharpe at ethereal.com, http://www.richardsharpe.com




More information about the samba-technical mailing list