MCPcopy Index your code
hub / github.com/MapServer/MapServer / msResetErrorList

Function msResetErrorList

maperror.c:223–278  ·  view source on GitHub ↗

msResetErrorList() ** ** Clear the list of error objects. */

Source from the content-addressed store, hash-verified

221** Clear the list of error objects.
222*/
223void msResetErrorList()
224{
225 errorObj *ms_error, *this_error;
226 ms_error = msGetErrorObj();
227
228 this_error = ms_error->next;
229 while( this_error != NULL)
230 {
231 errorObj *next_error;
232
233 next_error = this_error->next;
234 msFree(this_error);
235 this_error = next_error;
236 }
237
238 ms_error->next = NULL;
239 ms_error->code = MS_NOERR;
240 ms_error->routine[0] = '\0';
241 ms_error->message[0] = '\0';
242
243/* -------------------------------------------------------------------- */
244/* Cleanup our entry in the thread list. This is mainly */
245/* imprortant when msCleanup() calls msResetErrorList(). */
246/* -------------------------------------------------------------------- */
247#ifdef USE_THREAD
248 {
249 int thread_id = msGetThreadId();
250 te_info_t *link;
251
252 msAcquireLock( TLOCK_ERROROBJ );
253
254 /* find link for this thread */
255
256 for( link = error_list;
257 link != NULL && link->thread_id != thread_id
258 && link->next != NULL && link->next->thread_id != thread_id;
259 link = link->next ) {}
260
261 if( link->thread_id == thread_id )
262 {
263 /* presumably link is at head of list. */
264 if( error_list == link )
265 error_list = link->next;
266
267 free( link );
268 }
269 else if( link->next != NULL && link->next->thread_id == thread_id )
270 {
271 te_info_t *next_link = link->next;
272 link->next = link->next->next;
273 free( next_link );
274 }
275 msReleaseLock( TLOCK_ERROROBJ );
276 }
277#endif
278}
279
280char *msGetErrorCodeString(int code) {

Callers 12

ifFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
msWCSGetCoverageFunction · 0.85
msWCSException20Function · 0.85
msWCSDispatch20Function · 0.85
loadExpressionStringFunction · 0.85
msCleanupFunction · 0.85
msWFSException11Function · 0.85
msWCSException11Function · 0.85
php_mapscript.cFile · 0.85

Calls 5

msGetErrorObjFunction · 0.85
msFreeFunction · 0.85
msGetThreadIdFunction · 0.85
msAcquireLockFunction · 0.85
msReleaseLockFunction · 0.85

Tested by 1

mainFunction · 0.68