Re: Random problems connecting to DFS server

Michael B Allen <[email protected]>
Newsgroups gmane.network.samba.java
Message-ID <CAGMFw4gQ6FWw1y0ujE6J_VmetEMRySOxUR20AfwviMyUJHvJEg@mail.gmail.com>
Hi Gabor,

Ok. Your description is actually an interest clue in itself. So it was
a worthwhile exercise. Thanks for trying it.

Mike

On Fri, Apr 20, 2012 at 8:15 AM, Gabor Herr <[email protected]> wrote:
> Hi Mike,
>
> I've just tried your suggested workaround with my test case. Unfortunately
> it does not fix the problem. It looks like some method called from
> Dfs.resolve gets delayed (maybe waiting for some server response) and in the
> meanwhile tconHostname is set to null.
>
> Gabor
>
> Am 19.04.2012 17:51 schrieb "Michael B Allen" <[email protected]>:
>
>> 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/



-- 
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.