825
826
827
828
829
830
831
832
833
834
835
836
837
838
|
date_current = filed_format_time(date_current_b, sizeof(date_current_b), time(NULL));
/* Open socket as ANSI I/O for ease of use */
fp = fdopen(fd, "w+b");
if (fp == NULL) {
close(fd);
return;
}
request = filed_get_http_request(fp, request, options);
if (request == NULL) {
filed_error_page(fp, date_current, 500, FILED_REQUEST_METHOD_GET);
|
>
>
|
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
|
date_current = filed_format_time(date_current_b, sizeof(date_current_b), time(NULL));
/* Open socket as ANSI I/O for ease of use */
fp = fdopen(fd, "w+b");
if (fp == NULL) {
close(fd);
free(log);
return;
}
request = filed_get_http_request(fp, request, options);
if (request == NULL) {
filed_error_page(fp, date_current, 500, FILED_REQUEST_METHOD_GET);
|
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
|
* accept() failing
*/
if (fd < 0) {
/* Log the new connection */
filed_log_msg("ACCEPT_FAILED");
failure_count++;
continue;
}
/* Fill in log structure */
if (filed_log_ip((struct sockaddr *) &addr, log->ip, sizeof(log->ip)) == NULL) {
log->ip[0] = '\0';
|
>
>
|
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
|
* accept() failing
*/
if (fd < 0) {
/* Log the new connection */
filed_log_msg("ACCEPT_FAILED");
failure_count++;
free(log);
continue;
}
/* Fill in log structure */
if (filed_log_ip((struct sockaddr *) &addr, log->ip, sizeof(log->ip)) == NULL) {
log->ip[0] = '\0';
|