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

Function cupsdStopServer

scheduler/server.c:98–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96 */
97
98void
99cupsdStopServer(void)
100{
101 if (!started)
102 return;
103
104 /*
105 * Stop color management (as needed)...
106 */
107
108 cupsdStopColor();
109
110 /*
111 * Close all network clients...
112 */
113
114 cupsdCloseAllClients();
115 cupsdStopListening();
116 cupsdStopBrowsing();
117 cupsdStopAllNotifiers();
118 cupsdDeleteAllCerts();
119
120 if (Clients)
121 {
122 cupsArrayDelete(Clients);
123 Clients = NULL;
124 }
125
126 /*
127 * Close the pipe for CGI processes...
128 */
129
130 if (CGIPipes[0] >= 0)
131 {
132 cupsdRemoveSelect(CGIPipes[0]);
133
134 cupsdStatBufDelete(CGIStatusBuffer);
135 close(CGIPipes[1]);
136
137 CGIPipes[0] = -1;
138 CGIPipes[1] = -1;
139 }
140
141 /*
142 * Close all log files...
143 */
144
145 if (AccessFile != NULL)
146 {
147 if (AccessFile != LogStderr)
148 cupsFileClose(AccessFile);
149
150 AccessFile = NULL;
151 }
152
153 if (ErrorFile != NULL)
154 {
155 if (ErrorFile != LogStderr)

Callers 1

mainFunction · 0.85

Calls 14

cupsdStopColorFunction · 0.85
cupsdCloseAllClientsFunction · 0.85
cupsdStopListeningFunction · 0.85
cupsdStopBrowsingFunction · 0.85
cupsdStopAllNotifiersFunction · 0.85
cupsdDeleteAllCertsFunction · 0.85
cupsArrayDeleteFunction · 0.85
cupsdRemoveSelectFunction · 0.85
cupsdStatBufDeleteFunction · 0.85
cupsFileCloseFunction · 0.85
cupsdDestroyProfileFunction · 0.85
cupsdExpireSubscriptionsFunction · 0.85

Tested by

no test coverage detected