void client_shutdown(void) { usbmuxd_log(LL_DEBUG, "client_shutdown"); FOREACH(struct mux_client *client, &client_list) { client_close(client); } ENDFOREACH pthread_mutex_destroy(&client_list_mutex); collection_free(&client_list); }
void collection_unref(CollectionData *cd) { cd->ref--; DEBUG_1("collection \"%s\" ref count = %d", cd->name, cd->ref); if (cd->ref < 1) { collection_free(cd); } }