[jcifs] Infinite loop of error messages

Michael B Allen mba2000 at ioplex.com
Sun Nov 12 03:45:11 GMT 2006


Patch applied (in addition to other Transport fixes related to
interrupting Transports, invalid state conditions, and uncontrolled
looping).

Mike

On Fri, 20 Oct 2006 17:07:58 +0200
Christophe Bouthier <christophe.bouthier at inpl-nancy.fr> wrote:

> Christophe Bouthier a écrit :
> > Michael B Allen a écrit :
> >> Actually from looking at the code I'm not sure it's an error for
> >> disconnect() to be called while in state 2 (run connected). I
> >> think I would just consider this to be not connected and modify
> >> jcifs.util.transport.Transport.java:disconnect() to be like:
> >>
> >>     193     public void disconnect( boolean hard ) throws IOException {
> >>     194         synchronized(setupDiscoLock) {
> >>     195             synchronized(this) {
> >>     196                 switch (state) {
> >>     197                     case 0: /* not connected - just return */
> >>     198                     case 2:
> >>     199                         return;
> >>
> >> Meaning add 'case 2:' so that if it's in state 2 it just ignores the
> >> disconnect() call since the transport isn't connected.
> >>
> >> Or, it might be better to do something like this:
> >>
> >>     193     public void disconnect( boolean hard ) throws IOException {
> >>     194         synchronized(setupDiscoLock) {
> >>     195             synchronized(this) {
> >>     196                 switch (state) {
> >>     197                     case 0: /* not connected - just return */
> >>     198                         return;
> >>     199                     case 2:     200                         
> >> hard = true;
> >>     201                     case 3: /* connected - go ahead and 
> >> disconnect */
> >>
> >> Since the transport isn't really connected it should have any sessions
> >> open or anything. We can just do the disconnect routine but set hard =
> >> true to give it a quick action.
> >>
> >> Actually I would try the second change first.
> >>
> >> Mike
> > 
> > Ok, thanks a lot for your answer. I will try the second change and put 
> > it on our portal. I will post feedback on the list.
> > 
> > 
> > Christophe Bouthier
> > CRI INPL
> > Nancy, France
> 
> Hi,
> 
> Just to tell you that we put a library recompiled with the second patch 
> in your production portal since 15 days, and we didn't get the log 
> overflow problem anymore.
> 
> Thanks a lot for your help.
> 
> 
> Christophe Bouthier
> CRI INPL
> Nancy, France
> 


-- 
Michael B Allen
PHP Active Directory SSO
http://www.ioplex.com/


More information about the jcifs mailing list