[jcifs] RE: [Fwd: SmbTree copy()]

rjw rob at wygand.com
Wed Oct 31 05:05:07 EST 2001


Allen, Michael B (RSCH) wrote:

> Yikes. What does this program do? It's endless Node Status and 

> Trans2QueryInformation requests.


Yes, it's lots of requests. I'm quite unsure why that is, to be honest. 
The snippet of the log does nothing but attempt to copy a file and then 
does a list() on the destination folder to get an updated view (granted 
this isn't optimum, but that's the way it is now. =)  There's some other 
setup-tpe stuff before-hand... does everything exists, blah, blah, blah.


> 	You difinately need tid2. It has to be the tree id of the tree (a.k.a. share) that the other file is in. But from examining the below it should work because the shares (and therefore tids) are
> the same. It's possible that the packet encoding isn't quite right since the last time this method was used. Try useUnicode=false just as an exercise. I think you'd really need to break out Ethereal
> or NetMon and just compare each field byte for byte. THat's what I would do.


Okay, I'll look into that.

> 	Yeah, this all should work. It looks right. PS you can easily get tid2 from dest.tree.tid. Then, presuming, you get it working you can also do copies accross shares without going through the
> client. If I have time, maybe I'll look into fixing this.


Ah, I'll have a loot at that!

> 	That 'test' directory exists right?


Aye, test exists. The last bit of log should actually be an 
SmbFile.list() of test after the copy failed.

Thanks for the assistance, I'll look into more deeply into the problem. 
If I get it working, I'll let you know...

rjw

-- 
Robert J. Wygand, III, D.D.                  rob at wygand.com
GPG  [A267 C8F7 34C2 2896 20F3]  [7DC8 2605 9E4C 573A 20EC]

"They that can give up essential liberty to obtain a little
  temporary safety deserve neither liberty nor safety."





More information about the jcifs mailing list