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/txt-converter/login | |
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/txt-converter/login')
-rw-r--r-- | src/txt-converter/login/login-converter.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/txt-converter/login/login-converter.c b/src/txt-converter/login/login-converter.c index c0055da..22957ff 100644 --- a/src/txt-converter/login/login-converter.c +++ b/src/txt-converter/login/login-converter.c @@ -87,7 +87,7 @@ int read_gm_account() gm_account_db = numdb_init(); printf("gm_account: read start\n"); - if( (fp=fopen("conf/GM_account.txt","r"))==NULL ) + if( (fp=fopen_("conf/GM_account.txt","r"))==NULL ) return 1; while(fgets(line,sizeof(line),fp)){ if(line[0] == '/' && line[1] == '/') @@ -107,7 +107,7 @@ int read_gm_account() } c++; } - fclose(fp); + fclose_(fp); printf("gm_account: read done (%d gm account ID)\n",c); return 0; } @@ -138,7 +138,7 @@ int mmo_auth_init(void) time_t connect_until_time; char t_uid[256]; - fp=fopen("save/account.txt","r"); + fp=fopen_("save/account.txt","r"); auth_dat=malloc(sizeof(auth_dat[0])*256); auth_max=256; if(fp==NULL) @@ -173,7 +173,7 @@ int mmo_auth_init(void) printf("DB server Error - %s\n", mysql_error(&mysql_handle) ); } } - fclose(fp); + fclose_(fp); printf ("convert end...\n"); @@ -191,7 +191,7 @@ int login_config_read(const char *cfgName){ char line[1024], w1[1024], w2[1024]; FILE *fp; - fp=fopen(cfgName,"r"); + fp=fopen_(cfgName,"r"); if(fp==NULL){ printf("file not found: %s\n", cfgName); @@ -229,7 +229,7 @@ int login_config_read(const char *cfgName){ printf ("set db_server_logindb : %s\n",w2); } } - fclose(fp); + fclose_(fp); printf ("End reading configuration...\n"); return 0; } |