Check-in [df2de34e2e]
Overview
Comment:Updated to log fdopen failures instead of silently ignoring them
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: df2de34e2e2aa0d2e46bccec4c897c3f3f38ac50
User & Date: rkeene on 2014-02-18 05:21:33
Other Links: manifest | tags
Context
2014-02-18
20:03
Removed index.html serving workaround check-in: 6255e77ee6 user: rkeene tags: trunk
05:21
Updated to log fdopen failures instead of silently ignoring them check-in: df2de34e2e user: rkeene tags: trunk
05:18
Fixed potential (but unlikely) memory leaks related to logging check-in: f8df53b1e3 user: rkeene tags: trunk
Changes

Modified filed.c from [386b3803b7] to [79c614eba1].

825
826
827
828
829
830
831




832
833
834
835
836
837
838
839
	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) {







>
>
>
>
|







825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
	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);

		log->buffer[0] = '\0';
		log->http_code = -1;
		log->reason = "fdopen_failed";

		filed_log_entry(log);

		return;
	}

	request = filed_get_http_request(fp, request, options);

	if (request == NULL) {