| 52 | */ |
| 53 | |
| 54 | static int /* O - 1 to continue, 0 to stop */ |
| 55 | enum_dests_cb(void *_name, /* I - Printer name, if any */ |
| 56 | unsigned flags, /* I - Enumeration flags */ |
| 57 | cups_dest_t *dest) /* I - Found destination */ |
| 58 | { |
| 59 | const char *name = (const char *)_name; |
| 60 | /* Printer name */ |
| 61 | cups_dest_t *cdest; /* Copied destination */ |
| 62 | |
| 63 | |
| 64 | (void)flags; |
| 65 | |
| 66 | /* |
| 67 | * If a name was specified, compare it... |
| 68 | */ |
| 69 | |
| 70 | if (name && strcasecmp(name, dest->name)) |
| 71 | return (1); /* Continue */ |
| 72 | |
| 73 | /* |
| 74 | * Copy the destination and run the query on a separate thread... |
| 75 | */ |
| 76 | |
| 77 | cupsCopyDest(dest, 0, &cdest); |
| 78 | _cupsThreadWait(_cupsThreadCreate((_cups_thread_func_t)run_query, cdest)); |
| 79 | |
| 80 | cupsFreeDests(1, cdest); |
| 81 | |
| 82 | /* |
| 83 | * Continue if no name was specified or the name matches... |
| 84 | */ |
| 85 | |
| 86 | return (!name || !strcasecmp(name, dest->name)); |
| 87 | } |
| 88 | |
| 89 | |
| 90 | /* |
nothing calls this directly
no test coverage detected