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/npc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index 11725b3..5fe190b 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -21,6 +21,7 @@ #include "pc.h" #include "script.h" #include "skill.h" +#include "../common/socket.h" #ifdef MEMWATCH #include "memwatch.h" @@ -2008,7 +2009,7 @@ int do_init_npc(void) free(nsl->prev); nsl->prev = NULL; } - fp=fopen(nsl->name,"r"); + fp=fopen_(nsl->name,"r"); if (fp==NULL) { printf("file not found : %s\n",nsl->name); exit(1); @@ -2065,7 +2066,7 @@ int do_init_npc(void) npc_parse_mapflag(w1,w2,w3,w4); } } - fclose(fp); + fclose_(fp); printf("\rLoading NPCs [%d]: %-54s",npc_id-START_NPC_NUM,nsl->name); fflush(stdout); } -- cgit v1.2.3-70-g09d2