Re: Random problems connecting to DFS server

Michael B Allen <[email protected]>
Newsgroups gmane.network.samba.java
Message-ID <CAGMFw4ij-c2n0nSQALA8vvbuR2=aCOWyDfpK8XWu-ETqU13k2A@mail.gmail.com>
On Tue, Apr 17, 2012 at 5:17 PM, Gabor Herr <[email protected]> wrote:
> I don't know about any bug tracker for jcifs, so hopefully Mike has noticed
> this post...

There is a bug tracker. But it's just a web-based sortable "TODO list"
that only I have access to. If someone wants to +1 something just do
it on the list.

But this NPE is already listed high on the TODO list and, as I eluded
to in my initial response, the proposed "patch" is absolutely not
correct. I will have to investigate how the tconHostName can be null
after connect0 was called successfully.

A safer workaround for now might be to try something in
SmbFile.java:isConnected() like:

  return tree != null && tree.connectionState == 2 &&
tree.session.transport.tconHostName != null;

The rational is that if tconHostName is null, something called
doDisconnect so isConnected should probably return false. Then again,
if this is a concurrency issue this "workaround" could just cause the
code to go around in circles.

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.