Check-in [abb8c966f2]
Overview
Comment:Added large file support
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: abb8c966f2c92408bef951b6da75b03262a3a519
User & Date: rkeene on 2014-02-06 07:53:57
Other Links: manifest | tags
Context
2014-02-06
08:03
Fixed segfault issue and updated to limit sendfile() size check-in: 47ef170824 user: rkeene tags: trunk
07:53
Added large file support check-in: abb8c966f2 user: rkeene tags: trunk
07:50
Added support for a non-blocking HTTP mode check-in: 145eda8451 user: rkeene tags: trunk
Changes

Modified Makefile from [677189cc54] to [e246314724].

1
2
3
4
5
6
7
8
9
CC = gcc
CFLAGS = -Wall -Werror -W -pthread -O3
LDFLAGS = -pthread -static
LIBS = -lpthread

filed: filed.o
	$(CC) $(CFLAGS) $(LDFLAGS) -o "$@" $^ $(LIBS)

filed.o: filed.c

|







1
2
3
4
5
6
7
8
9
CC = gcc
CFLAGS = -Wall -Werror -W -pthread -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
LDFLAGS = -pthread -static
LIBS = -lpthread

filed: filed.o
	$(CC) $(CFLAGS) $(LDFLAGS) -o "$@" $^ $(LIBS)

filed.o: filed.c

Modified filed.c from [c383e2203f] to [5dd5b62c7d].

208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
	pthread_mutex_lock(&cache->mutex);

	filed_log_msg_debug("Completed locking mutex for idx: %lu", (unsigned long) cache_idx);

	if (strcmp(path, cache->path) != 0) {
		filed_log_msg_debug("Cache miss for idx: %lu: OLD \"%s\", NEW \"%s\"", (unsigned long) cache_idx, cache->path, path);

		fd = open(path, O_RDONLY);
		if (fd < 0) {
			pthread_mutex_unlock(&cache->mutex);

			return(NULL);
		}

		free(cache->path);







|







208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
	pthread_mutex_lock(&cache->mutex);

	filed_log_msg_debug("Completed locking mutex for idx: %lu", (unsigned long) cache_idx);

	if (strcmp(path, cache->path) != 0) {
		filed_log_msg_debug("Cache miss for idx: %lu: OLD \"%s\", NEW \"%s\"", (unsigned long) cache_idx, cache->path, path);

		fd = open(path, O_RDONLY | O_LARGEFILE);
		if (fd < 0) {
			pthread_mutex_unlock(&cache->mutex);

			return(NULL);
		}

		free(cache->path);