| 557 | } |
| 558 | |
| 559 | AP_DECLARE(const char *)ap_check_mpm(void) |
| 560 | { |
| 561 | static const char *last_mpm_name = NULL; |
| 562 | |
| 563 | if (!_hooks.link_mpm || _hooks.link_mpm->nelts == 0) |
| 564 | return "No MPM loaded."; |
| 565 | else if (_hooks.link_mpm->nelts > 1) |
| 566 | return "More than one MPM loaded."; |
| 567 | |
| 568 | if (last_mpm_name) { |
| 569 | if (strcmp(last_mpm_name, ap_show_mpm())) { |
| 570 | return "The MPM cannot be changed during restart."; |
| 571 | } |
| 572 | } |
| 573 | else { |
| 574 | last_mpm_name = apr_pstrdup(ap_pglobal, ap_show_mpm()); |
| 575 | } |
| 576 | |
| 577 | return NULL; |
| 578 | } |
no test coverage detected