MCPcopy Create free account
hub / github.com/OpenPrinting/cups / cups_dnssd_resolve_cb

Function cups_dnssd_resolve_cb

cups/dest.c:3323–3350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3321 */
3322
3323static int /* O - 1 to continue, 0 to stop */
3324cups_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/*

Callers

nothing calls this directly

Calls 1

_cupsGetClockFunction · 0.85

Tested by

no test coverage detected