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      1   CC = gcc
     2         -CFLAGS = -Wall -Werror -W -pthread -O3
            2  +CFLAGS = -Wall -Werror -W -pthread -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
     3      3   LDFLAGS = -pthread -static
     4      4   LIBS = -lpthread
     5      5   
     6      6   filed: filed.o
     7      7   	$(CC) $(CFLAGS) $(LDFLAGS) -o "$@" $^ $(LIBS)
     8      8   
     9      9   filed.o: filed.c

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

   208    208   	pthread_mutex_lock(&cache->mutex);
   209    209   
   210    210   	filed_log_msg_debug("Completed locking mutex for idx: %lu", (unsigned long) cache_idx);
   211    211   
   212    212   	if (strcmp(path, cache->path) != 0) {
   213    213   		filed_log_msg_debug("Cache miss for idx: %lu: OLD \"%s\", NEW \"%s\"", (unsigned long) cache_idx, cache->path, path);
   214    214   
   215         -		fd = open(path, O_RDONLY);
          215  +		fd = open(path, O_RDONLY | O_LARGEFILE);
   216    216   		if (fd < 0) {
   217    217   			pthread_mutex_unlock(&cache->mutex);
   218    218   
   219    219   			return(NULL);
   220    220   		}
   221    221   
   222    222   		free(cache->path);