Lines 1-43
Link Here
|
1 |
Index: lisp/riece-rdcc.el |
|
|
2 |
=================================================================== |
3 |
RCS file: /cvs/root/riece/lisp/riece-rdcc.el,v |
4 |
retrieving revision 1.26 |
5 |
diff -u -F^( -r1.26 riece-rdcc.el |
6 |
--- lisp/riece-rdcc.el 6 Jun 2004 06:11:59 -0000 1.26 |
7 |
+++ lisp/riece-rdcc.el 4 Nov 2004 07:12:26 -0000 |
8 |
@@ -64,6 +64,9 @@ (defcustom riece-rdcc-send-program |
9 |
total += bytes.length |
10 |
puts(\"#{total}\") |
11 |
session.write(bytes) |
12 |
+ begin |
13 |
+ buf = session.read(4) |
14 |
+ end until buf.unpack('N')[0] == total |
15 |
end |
16 |
} |
17 |
session.close |
18 |
@@ -198,13 +201,21 @@ (defun riece-rdcc-filter (process input) |
19 |
(let ((coding-system-for-write 'binary) |
20 |
jka-compr-compression-info-list jam-zcat-filename-list) |
21 |
(write-region (point-min) (point-max) riece-rdcc-temp-file t 0)) |
22 |
+ (setq riece-rdcc-received-size (+ (buffer-size) riece-rdcc-received-size)) |
23 |
+ (process-send-string |
24 |
+ process |
25 |
+ (format "%c%c%c%c" |
26 |
+ (logand (lsh riece-rdcc-received-size -24) 255) |
27 |
+ (logand (lsh riece-rdcc-received-size -16) 255) |
28 |
+ (logand (lsh riece-rdcc-received-size -8) 255) |
29 |
+ (logand riece-rdcc-received-size 255))) |
30 |
(message "Receiving %s from %s...(%s/%s)" |
31 |
(file-name-nondirectory riece-rdcc-request-file) |
32 |
riece-rdcc-request-user |
33 |
- (riece-rdcc-format-size |
34 |
- (setq riece-rdcc-received-size (+ (buffer-size) |
35 |
- riece-rdcc-received-size))) |
36 |
- (riece-rdcc-format-size riece-rdcc-request-size)))) |
37 |
+ (riece-rdcc-format-size riece-rdcc-received-size) |
38 |
+ (riece-rdcc-format-size riece-rdcc-request-size)) |
39 |
+ (if (= riece-rdcc-received-size riece-rdcc-request-size) |
40 |
+ (set-process-filter process nil)))) |
41 |
|
42 |
(defun riece-rdcc-sentinel (process status) |
43 |
(save-excursion |