Commit 2209fc49329397db92c0fb92dfbd02bdf6a2aca3
1 parent
27d96f2a
fix writing mistake and print some information in failure case in get_file
manage the quit_requested on MessageQueue
Showing
2 changed files
with
8 additions
and
10 deletions
Show diff stats
calexium_lib/net_services/CXM_net_services.anubis
| ... | ... | @@ -116,7 +116,7 @@ define One |
| 116 | 116 | MessageQueue queue, |
| 117 | 117 | List(NetService) net_services |
| 118 | 118 | ) = |
| 119 | - if queue.quit_requested(uniqe) then | |
| 119 | + if queue.quit_requested(unique) then | |
| 120 | 120 | unique |
| 121 | 121 | else |
| 122 | 122 | println("PRE SERVICE message_receiver "+"["+virtual_machine_id + "]"); | ... | ... |
calexium_lib/net_services_protocols/ftp_client.anubis
| ... | ... | @@ -85,16 +85,16 @@ define Maybe(One) |
| 85 | 85 | println("_CXM_FTP_GET_FILE sent"); |
| 86 | 86 | if wait_for_reply(mQ, _CXM_FTP_GET_FILE, 30) is |
| 87 | 87 | { |
| 88 | - failure then failure, | |
| 89 | - timeout then failure, | |
| 90 | - unknow_cmd then failure, | |
| 91 | - error then failure, | |
| 92 | - ok then failure, | |
| 88 | + failure then println("get_file failure");failure, | |
| 89 | + timeout then println("get_file timeout");failure, | |
| 90 | + unknow_cmd then println("get_file unknow_cmd");failure, | |
| 91 | + error then println("get_file remote error msg");failure, | |
| 92 | + ok then println("get_file ok");failure, | |
| 93 | 93 | ok_msg(msg)then |
| 94 | 94 | if find_int32(msg, "FileSize") is |
| 95 | 95 | { |
| 96 | 96 | failure then println("file size not found"); failure, |
| 97 | - success(size) then | |
| 97 | + success(size) then println("file size "+size); | |
| 98 | 98 | start_get_file_transtert(mQ, local_file, size) |
| 99 | 99 | } |
| 100 | 100 | } |
| ... | ... | @@ -142,9 +142,7 @@ public define Maybe(One) |
| 142 | 142 | with queue = create_MessageQueue, |
| 143 | 143 | message_transceiver(conn, queue); |
| 144 | 144 | if request_for_service(queue) then |
| 145 | - with result = get_file(queue, remote_file, local_file), | |
| 146 | - queue.quit(unique); | |
| 147 | - result | |
| 145 | + get_file(queue, remote_file, local_file) | |
| 148 | 146 | else |
| 149 | 147 | println("Service not found");failure |
| 150 | 148 | } | ... | ... |