diff options
author | Dennis Friis <peavey@inspircd.org> | 2009-07-07 00:52:08 +0200 |
---|---|---|
committer | Dennis Friis <peavey@inspircd.org> | 2009-07-07 00:55:31 +0200 |
commit | 4673fd3ca06010e74f8223486b0f34e58c7b0a7e (patch) | |
tree | cfcc97752fd770eb1befa295e16f7aa4a2607ca9 /src/tool | |
parent | 03b5e644857f80a23bd8b856b78a10cf0a564a66 (diff) | |
download | tmwa-4673fd3ca06010e74f8223486b0f34e58c7b0a7e.tar.gz tmwa-4673fd3ca06010e74f8223486b0f34e58c7b0a7e.tar.bz2 tmwa-4673fd3ca06010e74f8223486b0f34e58c7b0a7e.tar.xz tmwa-4673fd3ca06010e74f8223486b0f34e58c7b0a7e.zip |
Fixes to socket system to make it cope better with fd depletion.
Also added timeout for fullconnect, secured map server from stateless
connections.
Diffstat (limited to 'src/tool')
-rw-r--r-- | src/tool/adduser.c | 4 | ||||
-rw-r--r-- | src/tool/convert.c | 4 |
2 files changed, 4 insertions, 4 deletions
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; |