From 4673fd3ca06010e74f8223486b0f34e58c7b0a7e Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Tue, 7 Jul 2009 00:52:08 +0200 Subject: Fixes to socket system to make it cope better with fd depletion. Also added timeout for fullconnect, secured map server from stateless connections. --- src/map/map.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index ee42d3d..86acb62 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1454,7 +1454,7 @@ static void map_readwater(char *watertxt) { FILE *fp=NULL; int n=0; - fp=fopen(watertxt,"r"); + fp=fopen_(watertxt,"r"); if(fp==NULL){ printf("file not found: %s\n",watertxt); return; @@ -1475,7 +1475,7 @@ static void map_readwater(char *watertxt) { waterlist[n].waterheight = 3; n++; } - fclose(fp); + fclose_(fp); } /*========================================== @@ -1665,7 +1665,7 @@ int map_config_read(char *cfgName) { FILE *fp; struct hostent *h = NULL; - fp = fopen(cfgName,"r"); + fp = fopen_(cfgName,"r"); if (fp == NULL) { printf("Map configuration file not found at: %s\n", cfgName); exit(1); @@ -1730,7 +1730,7 @@ int map_config_read(char *cfgName) { } } } - fclose(fp); + fclose_(fp); return 0; } -- cgit v1.2.3-70-g09d2