| 787 | } |
| 788 | |
| 789 | static int log_apr_status(const ap_errorlog_info *info, const char *arg, |
| 790 | char *buf, int buflen) |
| 791 | { |
| 792 | apr_status_t status = info->status; |
| 793 | int len; |
| 794 | if (!status) |
| 795 | return 0; |
| 796 | |
| 797 | if (status < APR_OS_START_EAIERR) { |
| 798 | len = apr_snprintf(buf, buflen, "(%d)", status); |
| 799 | } |
| 800 | else if (status < APR_OS_START_SYSERR) { |
| 801 | len = apr_snprintf(buf, buflen, "(EAI %d)", |
| 802 | status - APR_OS_START_EAIERR); |
| 803 | } |
| 804 | else if (status < 100000 + APR_OS_START_SYSERR) { |
| 805 | len = apr_snprintf(buf, buflen, "(OS %d)", |
| 806 | status - APR_OS_START_SYSERR); |
| 807 | } |
| 808 | else { |
| 809 | len = apr_snprintf(buf, buflen, "(os 0x%08x)", |
| 810 | status - APR_OS_START_SYSERR); |
| 811 | } |
| 812 | apr_strerror(status, buf + len, buflen - len); |
| 813 | len += strlen(buf + len); |
| 814 | return len; |
| 815 | } |
| 816 | |
| 817 | static int log_server_name(const ap_errorlog_info *info, const char *arg, |
| 818 | char *buf, int buflen) |
no outgoing calls
no test coverage detected