[jcifs] code snippet where SmbFile.listFiles hangs

Sujit Jagdev sujit.jagdev at casero.com
Fri Nov 1 03:27:33 EST 2002


Dear Michael,
I have bolded the line where the wait is occurring.
I will keep testing and debugging it more today.
Sujit
 
Class: SmbFile
Method: listFiles( String wildcard )
Line : 1268
 
//**********************************************************************
*****************************
 
        } else if( share == null ) {
                if( getType() == TYPE_WORKGROUP ) {
                    NetServerEnum2Response response = new
NetServerEnum2Response();
                    sendTransaction( new NetServerEnum2( url.getHost(),
                                            NetServerEnum2.SV_TYPE_ALL
), response );
 
                    if( response.status != SmbException.NERR_Success &&
                            response.status !=
SmbException.ERROR_MORE_DATA ) {
                        throw new SmbException( SmbException.ERRRAP,
response.status );
                    }
 
                    SmbFile[] ret = new
SmbFile[response.entriesReturned];
                    for( int i = 0; i < response.entriesReturned; i++ )
{
                        ret[i] = new SmbFile( this,
                                        response.results[i].name,
                                        TYPE_SERVER,
                                        ATTR_READONLY | ATTR_DIRECTORY,
                                        0L,
                                        0L );
                    }
 
                    return ret;
                } else {
                    NetShareEnumResponse response = new
NetShareEnumResponse();
                    sendTransaction( new NetShareEnum(), response );
 
                    if( response.status != SmbException.NERR_Success &&
                                response.status !=
SmbException.ERROR_MORE_DATA ) {
                        throw new SmbException( SmbException.ERRRAP,
response.status );
                    }
 
                    SmbFile[] ret = new
SmbFile[response.entriesReturned];
                    for( int i = 0; i < response.entriesReturned; i++ )
{
                        ret[i] = new SmbFile( this,
                                        response.results[i].netName,
                                        0,
                                        ATTR_READONLY | ATTR_DIRECTORY,
                                        0L,
                                        0L );
                    }
                    return ret;
 
//**********************************************************************
******************************************


-----

The information contained in this message is proprietary of Casero Inc.,
protected from disclosure, and may be privileged. The information is
intended to be conveyed only to the designated recipient(s) of the
message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or
copying of this communication is strictly prohibited and may be
unlawful. If you have received this communication in error, please
notify us immediately by replying to the message and deleting it from
your computer. Thank you.
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list