155 |
with _ -> ip |
with _ -> ip |
156 |
else ip |
else ip |
157 |
with _ -> |
with _ -> |
158 |
lprintf_nl "[DNS]: Resolving [%s] ..." name; |
lprintf_nl "[DNS] Resolving [%s] ..." name; |
159 |
let ip = gethostbyname name in |
let ip = gethostbyname name in |
160 |
Hashtbl.add ip_cache name (ip, current_time +. 3600.); |
Hashtbl.add ip_cache name (ip, current_time +. 3600.); |
161 |
ip |
ip |
283 |
Hashtbl.add ip_cache job.name (ip, current_time +. 3600.); |
Hashtbl.add ip_cache job.name (ip, current_time +. 3600.); |
284 |
job.handler ip |
job.handler ip |
285 |
end else begin |
end else begin |
286 |
lprintf "[DNS]: lookup error: %s: address not found\n" job.name; |
lprintf_nl "[DNS] could not resolve %s, check URL" job.name; |
287 |
raise Not_found |
raise Not_found |
288 |
end |
end |
289 |
end else raise Exit |
end else raise Exit |