Resuming from SMB-shares (for samba-2.0.7)
Haas Andreas
moc at natnet.at
Thu Jan 25 19:51:22 GMT 2001
Hi,
I have found this short patch to get the smbclient -programm to "get" its
files with resuming support.
All you have to do is simply changing following lines:
client.c:
^^^^^^^
change line 671:=09
from:=09=09handle =3D sys_open(lname,O_WRONLY|O_CREAT|O_TRUNC,0644);=20
to:=09=09handle =3D sys_open(lname,O_WRONLY|O_CREAT,0644);=09=09
and before line 700 insert:
=09=09nread =3D lseek( handle, 0, SEEK_END );
(before that following while statement)
while (1) {
=09int n =3D cli_read(cli, fnum, data, nread, read_size);
=2E . .
Thats all to be done.=20
Now smbclient works with resuming turned on on all files you want to get.
It will not overwrite existing files anymore instead it goes to the exist=
ing
outputfile's end and continues appending the inputfile starting from the =
same
byte offset as the outputfile.=20
-> thats resuming
=09this information is provided to you=20
=09=09=09=09=09by MoC
More information about the samba-technical
mailing list