summaryrefslogtreecommitdiff
path: root/navit/file.c
diff options
context:
space:
mode:
authorrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-01-07 22:54:42 +0000
committerrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-01-07 22:54:42 +0000
commit0b1dc0d39678c9136f4ea7bc5158cae2e520d405 (patch)
tree3f88530384e7ad322081a927ae167ad23e3ee7ca /navit/file.c
parent27e758641b82602016ffefc2f6cb6aa03bde00bf (diff)
downloadnavit-0b1dc0d39678c9136f4ea7bc5158cae2e520d405.tar.gz
Fix:core:Fixed builds without socket support
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3881 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/file.c')
-rw-r--r--navit/file.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/navit/file.c b/navit/file.c
index 36c9a1801..9096a0f5b 100644
--- a/navit/file.c
+++ b/navit/file.c
@@ -118,26 +118,6 @@ file_http_request(struct file *file, char *method, char *host, char *path, char
file->requests++;
}
-static char *
-file_http_header_end(char *str, int len)
-{
- int i;
- for (i=0; i+1<len; i+=2) {
- if (str[i+1]=='\n') {
- if (str[i]=='\n')
- return str+i+2;
- else if (str[i]=='\r' && i+3<len && str[i+2]=='\r' && str[i+3]=='\n')
- return str+i+4;
- --i;
- } else if (str[i+1]=='\r') {
- if (i+4<len && str[i+2]=='\n' && str[i+3]=='\r' && str[i+4]=='\n')
- return str+i+5;
- --i;
- }
- }
- return NULL;
-}
-
static int
file_request_do(struct file *file, struct attr **options, int connect)
{
@@ -182,6 +162,26 @@ file_request_do(struct file *file, struct attr **options, int connect)
}
#endif
+static char *
+file_http_header_end(char *str, int len)
+{
+ int i;
+ for (i=0; i+1<len; i+=2) {
+ if (str[i+1]=='\n') {
+ if (str[i]=='\n')
+ return str+i+2;
+ else if (str[i]=='\r' && i+3<len && str[i+2]=='\r' && str[i+3]=='\n')
+ return str+i+4;
+ --i;
+ } else if (str[i+1]=='\r') {
+ if (i+4<len && str[i+2]=='\n' && str[i+3]=='\r' && str[i+4]=='\n')
+ return str+i+5;
+ --i;
+ }
+ }
+ return NULL;
+}
+
int
file_request(struct file *f, struct attr **options)
{