• Home
  • Raw
  • Download

Lines Matching refs:cg

31 static http_status_t	get_cupsd_conf(http_t *http, _cups_globals_t *cg,
34 static void invalidate_cupsd_cache(_cups_globals_t *cg);
110 _cups_globals_t *cg = _cupsGlobals(); /* Global data */ in cupsAdminGetServerSettings() local
123 if (cg->http) in cupsAdminGetServerSettings()
131 if (strcmp(cg->http->hostname, cg->server) || in cupsAdminGetServerSettings()
132 cg->ipp_port != httpAddrPort(cg->http->hostaddr) || in cupsAdminGetServerSettings()
133 (cg->http->encryption != cg->encryption && in cupsAdminGetServerSettings()
134 cg->http->encryption == HTTP_ENCRYPTION_NEVER)) in cupsAdminGetServerSettings()
140 httpClose(cg->http); in cupsAdminGetServerSettings()
141 cg->http = NULL; in cupsAdminGetServerSettings()
149 if (!cg->http) in cupsAdminGetServerSettings()
151 if ((cg->http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, in cupsAdminGetServerSettings()
170 http = cg->http; in cupsAdminGetServerSettings()
193 if ((status = get_cupsd_conf(http, cg, cg->cupsd_update, cupsdconf, in cupsAdminGetServerSettings()
229 invalidate_cupsd_cache(cg); in cupsAdminGetServerSettings()
231 cg->cupsd_update = time(NULL); in cupsAdminGetServerSettings()
232 httpGetHostname(http, cg->cupsd_hostname, sizeof(cg->cupsd_hostname)); in cupsAdminGetServerSettings()
352 cg->cupsd_num_settings = cupsAddOption(line, value, in cupsAdminGetServerSettings()
353 cg->cupsd_num_settings, in cupsAdminGetServerSettings()
354 &(cg->cupsd_settings)); in cupsAdminGetServerSettings()
359 cg->cupsd_num_settings = cupsAddOption(CUPS_SERVER_DEBUG_LOGGING, in cupsAdminGetServerSettings()
361 cg->cupsd_num_settings, in cupsAdminGetServerSettings()
362 &(cg->cupsd_settings)); in cupsAdminGetServerSettings()
364 cg->cupsd_num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ADMIN, in cupsAdminGetServerSettings()
367 cg->cupsd_num_settings, in cupsAdminGetServerSettings()
368 &(cg->cupsd_settings)); in cupsAdminGetServerSettings()
370 cg->cupsd_num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ANY, in cupsAdminGetServerSettings()
372 cg->cupsd_num_settings, in cupsAdminGetServerSettings()
373 &(cg->cupsd_settings)); in cupsAdminGetServerSettings()
375 cg->cupsd_num_settings = cupsAddOption(CUPS_SERVER_SHARE_PRINTERS, in cupsAdminGetServerSettings()
378 cg->cupsd_num_settings, in cupsAdminGetServerSettings()
379 &(cg->cupsd_settings)); in cupsAdminGetServerSettings()
381 cg->cupsd_num_settings = cupsAddOption(CUPS_SERVER_USER_CANCEL_ANY, in cupsAdminGetServerSettings()
383 cg->cupsd_num_settings, in cupsAdminGetServerSettings()
384 &(cg->cupsd_settings)); in cupsAdminGetServerSettings()
387 invalidate_cupsd_cache(cg); in cupsAdminGetServerSettings()
396 for (i = cg->cupsd_num_settings, setting = cg->cupsd_settings; in cupsAdminGetServerSettings()
402 return (cg->cupsd_num_settings > 0); in cupsAdminGetServerSettings()
461 _cups_globals_t *cg = _cupsGlobals(); /* Global data */ in cupsAdminSetServerSettings() local
482 if (get_cupsd_conf(http, cg, 0, cupsdconf, sizeof(cupsdconf), in cupsAdminSetServerSettings()
1310 invalidate_cupsd_cache(cg); in cupsAdminSetServerSettings()
1312 cg->cupsd_num_settings = cupsd_num_settings; in cupsAdminSetServerSettings()
1313 cg->cupsd_settings = cupsd_settings; in cupsAdminSetServerSettings()
1314 cg->cupsd_update = time(NULL); in cupsAdminSetServerSettings()
1316 httpGetHostname(http, cg->cupsd_hostname, sizeof(cg->cupsd_hostname)); in cupsAdminSetServerSettings()
1341 _cups_globals_t *cg, /* I - Global data */ in get_cupsd_conf() argument
1361 if (_cups_strcasecmp(cg->cupsd_hostname, host)) in get_cupsd_conf()
1362 invalidate_cupsd_cache(cg); in get_cupsd_conf()
1364 snprintf(name, namesize, "%s/cupsd.conf", cg->cups_serverroot); in get_cupsd_conf()
1406 invalidate_cupsd_cache(cg); in get_cupsd_conf()
1440 _cups_globals_t *cg) /* I - Global data */ in invalidate_cupsd_cache() argument
1442 cupsFreeOptions(cg->cupsd_num_settings, cg->cupsd_settings); in invalidate_cupsd_cache()
1444 cg->cupsd_hostname[0] = '\0'; in invalidate_cupsd_cache()
1445 cg->cupsd_update = 0; in invalidate_cupsd_cache()
1446 cg->cupsd_num_settings = 0; in invalidate_cupsd_cache()
1447 cg->cupsd_settings = NULL; in invalidate_cupsd_cache()