| 129 | */ |
| 130 | |
| 131 | void |
| 132 | cupsdAddLocation(cupsd_location_t *loc) /* I - Location to add */ |
| 133 | { |
| 134 | /* |
| 135 | * Make sure the locations array is created... |
| 136 | */ |
| 137 | |
| 138 | if (!Locations) |
| 139 | Locations = cupsArrayNew3((cups_array_func_t)compare_locations, NULL, |
| 140 | (cups_ahash_func_t)NULL, 0, |
| 141 | (cups_acopy_func_t)NULL, |
| 142 | (cups_afree_func_t)cupsdFreeLocation); |
| 143 | |
| 144 | if (Locations) |
| 145 | { |
| 146 | cupsArrayAdd(Locations, loc); |
| 147 | |
| 148 | cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdAddLocation: Added location \"%s\"", loc->location ? loc->location : "(null)"); |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | |
| 153 | /* |
no test coverage detected