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/tool/adduser.c | 4 ++-- src/tool/convert.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/tool') diff --git a/src/tool/adduser.c b/src/tool/adduser.c index 1219540..e22e7e9 100644 --- a/src/tool/adduser.c +++ b/src/tool/adduser.c @@ -37,7 +37,7 @@ int main(int argc, char *argv[]) { // Check to see if account.txt exists. printf("Checking if '%s' file exists...\n", account_txt); - FILE *FPaccin = fopen(account_txt, "r"); + FILE *FPaccin = fopen_(account_txt, "r"); if (FPaccin == NULL) { printf("'%s' file not found!\n", account_txt); printf("Run the setup wizard please.\n"); @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) { scanf("%s", &sex); } - FILE *FPaccout = fopen(account_txt, "r+"); + FILE *FPaccout = fopen_(account_txt, "r+"); fseek(FPaccout, 0, SEEK_END); fprintf(FPaccout, "%i %s %s - %s -\r\n", next_id, username, password, sex); close(FPaccout); diff --git a/src/tool/convert.c b/src/tool/convert.c index 16631c9..b747116 100644 --- a/src/tool/convert.c +++ b/src/tool/convert.c @@ -262,8 +262,8 @@ int mmo_char_convert(char *fname1,char *fname2) struct mmo_charstatus char_dat; FILE *ifp,*ofp; - ifp=fopen(fname1,"r"); - ofp=fopen(fname2,"w"); + ifp=fopen_(fname1,"r"); + ofp=fopen_(fname2,"w"); if(ifp==NULL) { printf("file not found %s\n",fname1); return 0; -- cgit v1.2.3-60-g2f50