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