Commit 8604078692768e26b0abe557c4b3e1e905dcc3b9
1 parent
949610f9
in Anubis 1.19 the syscall dns doesn't exists anymore. Now we use anubis dns fun…
…ction resolve_address in network/dns.anubis
Showing
2 changed files
with
7 additions
and
10 deletions
Show diff stats
asterisk/ami.anubis
| ... | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 | read system/string.anubis |
| 10 | 10 | read tools/basis.anubis |
| 11 | 11 | read tools/connections.anubis |
| 12 | +read network/dns.anubis | |
| 12 | 13 | |
| 13 | 14 | transmit xlib/asterisk/ami_types.anubis |
| 14 | 15 | transmit xlib/asterisk/ami_commands.anubis |
| ... | ... | @@ -120,8 +121,8 @@ public define Maybe(Asterisk_client) |
| 120 | 121 | // |
| 121 | 122 | // resolve server name and call 'https_get' with numeric server address: |
| 122 | 123 | // |
| 123 | - with a = dns(name), | |
| 124 | - if a is ok(server_addr) then | |
| 124 | + with a = resolve_address(name), | |
| 125 | + if a is success(server_addr) then | |
| 125 | 126 | println("TCP "+server_port+ " "+server_name); |
| 126 | 127 | if (Result(NetworkConnectError,RWStream))connect(server_addr, server_port) is |
| 127 | 128 | { | ... | ... |
net_services/CXM_generic_client.anubis
| ... | ... | @@ -9,6 +9,8 @@ |
| 9 | 9 | |
| 10 | 10 | transmit system/message_transceiver.anubis |
| 11 | 11 | transmit system/logger.anubis |
| 12 | +read network/dns.anubis | |
| 13 | + | |
| 12 | 14 | //transmit xlib/net_services_protocols/logger_service.anubis |
| 13 | 15 | |
| 14 | 16 | transmit xlib/CXM_message_constants.anubis |
| ... | ... | @@ -326,10 +328,7 @@ public define Word32 |
| 326 | 328 | (LogLevel, String) -> One logger |
| 327 | 329 | ) = |
| 328 | 330 | logger(logTrace, "Try to resolve URL [" + url_or_ip+ "]."); |
| 329 | - if ip_address(url_or_ip) is success(ip) then | |
| 330 | - logger(logTrace, "Try to resolve URL OK ip"+ip); | |
| 331 | - ip | |
| 332 | - else if dns(url_or_ip) is ok(ip_adr) then | |
| 331 | + if resolve_address(url_or_ip) is success(ip_adr) then | |
| 333 | 332 | logger(logTrace, "Try to resolve URL OK dns"+ip_adr); |
| 334 | 333 | ip_adr |
| 335 | 334 | else |
| ... | ... | @@ -344,10 +343,7 @@ public define Maybe(Word32) |
| 344 | 343 | (LogLevel, String) -> One logger |
| 345 | 344 | ) = |
| 346 | 345 | logger(logTrace, "Try to resolve URL [" + url_or_ip+ "]."); |
| 347 | - if ip_address(url_or_ip) is success(ip) then | |
| 348 | - logger(logTrace, "Try to resolve URL OK ip"+ip); | |
| 349 | - success(ip) | |
| 350 | - else if dns(url_or_ip) is ok(ip_adr) then | |
| 346 | + if resolve_address(url_or_ip) is success(ip_adr) then | |
| 351 | 347 | logger(logTrace, "Try to resolve URL OK dns"+ip_adr); |
| 352 | 348 | success(ip_adr) |
| 353 | 349 | else | ... | ... |