| 347 | */ |
| 348 | |
| 349 | static void trace_startup(apr_pool_t *p, server_rec *s, x_cfg *mconfig, |
| 350 | const char *note) |
| 351 | { |
| 352 | const char *sofar; |
| 353 | char *where, *addon; |
| 354 | |
| 355 | #if EXAMPLE_LOG_EACH |
| 356 | example_log_each(p, s, note); |
| 357 | #endif |
| 358 | |
| 359 | /* |
| 360 | * If we weren't passed a configuration record, we can't figure out to |
| 361 | * what location this call applies. This only happens for co-routines |
| 362 | * that don't operate in a particular directory or server context. If we |
| 363 | * got a valid record, extract the location (directory or server) to which |
| 364 | * it applies. |
| 365 | */ |
| 366 | where = (mconfig != NULL) ? mconfig->loc : "nowhere"; |
| 367 | where = (where != NULL) ? where : ""; |
| 368 | |
| 369 | addon = apr_pstrcat(p, |
| 370 | " <li>\n" |
| 371 | " <dl>\n" |
| 372 | " <dt><samp>", note, "</samp></dt>\n" |
| 373 | " <dd><samp>[", where, "]</samp></dd>\n" |
| 374 | " </dl>\n" |
| 375 | " </li>\n", |
| 376 | NULL); |
| 377 | |
| 378 | /* |
| 379 | * Make sure that we start with a valid string, even if we have never been |
| 380 | * called. |
| 381 | */ |
| 382 | sofar = (trace == NULL) ? "" : trace; |
| 383 | |
| 384 | trace = apr_pstrcat(p, sofar, addon, NULL); |
| 385 | } |
| 386 | |
| 387 | |
| 388 | /* |
no test coverage detected