Commit 239531ee20d54171205a14b19fb037743c80d69b

Authored by David RENÉ
1 parent dd87d694

fix the size to send, the mode new open file and some print debug

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
net_services/CXM_generic_protocol.anubis
@@ -220,7 +220,7 @@ public define Bool @@ -220,7 +220,7 @@ public define Bool
220 failure then println("can't create target file"+target_file);false, //nothing to write 220 failure then println("can't create target file"+target_file);false, //nothing to write
221 success(target) then 221 success(target) then
222 with buffer = mQ.raw_mode_on(size), 222 with buffer = mQ.raw_mode_on(size),
223 - //println("raw_more on buffer len "+length(buffer)+" buffer ["+to_string(buffer)+"]"); 223 + println("raw_mode ON buffer len "+length(buffer)+" buffer ["+to_string(buffer)+"]");
224 forget(flush(buffer, weaken(target))); 224 forget(flush(buffer, weaken(target)));
225 if copy_file_to_Connection(mQ.get_connection(unique), file(target), size - length(buffer)) is 225 if copy_file_to_Connection(mQ.get_connection(unique), file(target), size - length(buffer)) is
226 { 226 {
@@ -229,14 +229,14 @@ public define Bool @@ -229,14 +229,14 @@ public define Bool
229 } 229 }
230 } 230 }
231 else //by default the mode is new 231 else //by default the mode is new
232 - if (Maybe(RWStream))file(target_file, append) is 232 + if (Maybe(RWStream))file(target_file, new) is
233 { 233 {
234 failure then println("can't create target file"+target_file);false, //nothing to write 234 failure then println("can't create target file"+target_file);false, //nothing to write
235 success(target) then 235 success(target) then
236 with buffer = mQ.raw_mode_on(size), 236 with buffer = mQ.raw_mode_on(size),
237 - //println("raw_more on buffer len "+length(buffer)+" buffer ["+to_string(buffer)+"]"); 237 + println("raw_mode ON buffer len "+length(buffer)+" buffer ["+to_string(buffer)+"]");
238 forget(flush(buffer, weaken(target))); 238 forget(flush(buffer, weaken(target)));
239 - if copy_file_to_Connection(mQ.get_connection(unique), file(target), size) is 239 + if copy_file_to_Connection(mQ.get_connection(unique), file(target), size - length(buffer)) is
240 { 240 {
241 failure then mQ.raw_mode_off(unique);false, 241 failure then mQ.raw_mode_off(unique);false,
242 success(_) then mQ.raw_mode_off(unique);true 242 success(_) then mQ.raw_mode_off(unique);true