| 3321 | */ |
| 3322 | |
| 3323 | static int /* O - 1 to continue, 0 to stop */ |
| 3324 | cups_dnssd_resolve_cb(void *context) /* I - Resolve data */ |
| 3325 | { |
| 3326 | _cups_dnssd_resolve_t *resolve = (_cups_dnssd_resolve_t *)context; |
| 3327 | /* Resolve data */ |
| 3328 | double curtime; /* Current time */ |
| 3329 | |
| 3330 | |
| 3331 | /* |
| 3332 | * If the cancel variable is set, return immediately. |
| 3333 | */ |
| 3334 | |
| 3335 | if (resolve->cancel && *(resolve->cancel)) |
| 3336 | { |
| 3337 | DEBUG_puts("4cups_dnssd_resolve_cb: Canceled."); |
| 3338 | return (0); |
| 3339 | } |
| 3340 | |
| 3341 | /* |
| 3342 | * Otherwise check the end time... |
| 3343 | */ |
| 3344 | |
| 3345 | curtime = _cupsGetClock(); |
| 3346 | |
| 3347 | DEBUG_printf(("4cups_dnssd_resolve_cb: curtime=%.6f, end_time=%.6f", curtime, resolve->end_time)); |
| 3348 | |
| 3349 | return (curtime < resolve->end_time); |
| 3350 | } |
| 3351 | |
| 3352 | |
| 3353 | /* |
nothing calls this directly
no test coverage detected