[jcifs] Reconnecting after Win2000 shares fails

Darren Hartford dhartford at ghsinc.com
Fri Apr 8 12:48:58 GMT 2005


Confirm, that fixed it! :-)

Mucho thanks,
-D

> -----Original Message-----
> From: Michael B Allen [mailto:mba2000 at ioplex.com] 
> Sent: Thursday, April 07, 2005 7:19 PM
> To: Darren Hartford
> Cc: jcifs at lists.samba.org
> Subject: Re: [jcifs] Reconnecting after Win2000 shares fails
> 
> Michael B Allen said:
> >> I have a desktop share that I test connecting to a file repeatedly.
> >> Then, I disable this share.  Errors come up as normal. Then I 
> >> re-enable share. Still errors....
> > <snip>
> >> Caused by: jcifs.smb.SmbException: 0xC00000C9
> >> 	at jcifs.smb.SmbTransport.sendTransaction(SmbTransport.java:861)
> >> 	at jcifs.smb.SmbSession.sendTransaction(SmbSession.java:246)
> >> 	at jcifs.smb.SmbTree.sendTransaction(SmbTree.java:74)
> >> 	at jcifs.smb.SmbFile.sendTransaction(SmbFile.java:689)
> >> 	at jcifs.smb.SmbFile.queryPath(SmbFile.java:1230)
> >> 	at jcifs.smb.SmbFile.exists(SmbFile.java:1285)
> >
> > I think we just need a try/catch in 
> SmbTree.{send,sendTransaction} to 
> > trap NT_STATUS_NETWORK_NAME_DELETED and call treeDisconnect( true ).
> 
> I've added this fix to my current dev branch and verified it 
> works. You could add this the following to the end of SmbTree.send and
> SmbTree.sendTransaction:
> 
>         try {
>             session.send( request, response );
>         } catch( SmbException se ) {
>             if (se.getNtStatus() == 0xC00000C9) {
>                 treeDisconnect( true );
>             }
>             throw se;
>         }
> 
> I think it should work for stock 1.1.9.
> 
> Thanks,
> Mike
> 


More information about the jcifs mailing list