Overview
| Comment: | Moved more file size variables to correct type and started reporting on completion of files | 
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive | 
| Timelines: | family | ancestors | descendants | both | trunk | 
| Files: | files | file ages | folders | 
| SHA1: | 521131f3821259002d29afbb6bb56e99 | 
| User & Date: | rkeene on 2014-02-08 06:43:56 | 
| Other Links: | manifest | tags | 
Context
| 2014-02-08 | ||
| 06:55 | Updated to correctly display IPv4 address if bound to IPv4 addresses check-in: 2a36924161 user: rkeene tags: trunk | |
| 06:43 | Moved more file size variables to correct type and started reporting on completion of files check-in: 521131f382 user: rkeene tags: trunk | |
| 06:39 | Added appropriate licensing information check-in: daddda9632 user: rkeene tags: trunk | |
Changes
Modified filed.c from [a6b140c86c] to [99eaeee2ab].
| ︙ | ︙ | |||
| 578 579 580 581 582 583 584 | 
	);
}
/* Handle a single request from a client */
static void filed_handle_client(int fd, struct filed_http_request *request) {
	struct filed_fileinfo *fileinfo;
	ssize_t sendfile_ret;
 | | | | 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 | 
	);
}
/* Handle a single request from a client */
static void filed_handle_client(int fd, struct filed_http_request *request) {
	struct filed_fileinfo *fileinfo;
	ssize_t sendfile_ret;
	size_t sendfile_size;
	off_t sendfile_offset, sendfile_sent, sendfile_len;
	char *path;
	char *date_current, date_current_b[64];
	int http_code;
	FILE *fp;
	/* Determine current time */
	date_current = filed_format_time(date_current_b, sizeof(date_current_b), time(NULL));
 | 
| ︙ | ︙ | |||
| 754 755 756 757 758 759 760 | 
				sendfile_len -= sendfile_ret;
				sendfile_sent += sendfile_ret;
				if (sendfile_len == 0) {
					break;
				}
			}
 | < < > | 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 | 
				sendfile_len -= sendfile_ret;
				sendfile_sent += sendfile_ret;
				if (sendfile_len == 0) {
					break;
				}
			}
			filed_log_msg("SEND_COMPLETE STATUS=%s FILE_FD=%i FD=%i BYTES=%llu BYTES_SENT=%llu",
				(sendfile_sent == request->headers.range.length) ? "OK" : "PARTIAL",
				fileinfo->fd,
				fd,
				(unsigned long long) request->headers.range.length,
				(unsigned long long) sendfile_sent
			);
		}
 | 
| ︙ | ︙ |