| 413 | */ |
| 414 | |
| 415 | void |
| 416 | cupsdDeleteAllSubscriptions(void) |
| 417 | { |
| 418 | cupsd_subscription_t *sub; /* Subscription */ |
| 419 | |
| 420 | |
| 421 | _cupsRWLockWrite(&SubscriptionsLock); |
| 422 | |
| 423 | if (!Subscriptions) |
| 424 | goto done; |
| 425 | |
| 426 | for (sub = (cupsd_subscription_t *)cupsArrayFirst(Subscriptions); |
| 427 | sub; |
| 428 | sub = (cupsd_subscription_t *)cupsArrayNext(Subscriptions)) |
| 429 | { |
| 430 | cupsdDeleteSubscription(sub, -1); |
| 431 | } |
| 432 | |
| 433 | cupsArrayDelete(Subscriptions); |
| 434 | Subscriptions = NULL; |
| 435 | |
| 436 | done: |
| 437 | |
| 438 | _cupsRWUnlock(&SubscriptionsLock); |
| 439 | } |
| 440 | |
| 441 | |
| 442 | /* |
no test coverage detected