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

Function cupsdAddLocation

scheduler/auth.c:131–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129 */
130
131void
132cupsdAddLocation(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/*

Callers 1

read_locationFunction · 0.85

Calls 3

cupsArrayNew3Function · 0.85
cupsArrayAddFunction · 0.85
cupsdLogMessageFunction · 0.85

Tested by

no test coverage detected