summaryrefslogtreecommitdiff
path: root/src/txt-converter/char/char-converter.c
diff options
context:
space:
mode:
authorDennis Friis <peavey@inspircd.org>2009-07-07 00:52:08 +0200
committerDennis Friis <peavey@inspircd.org>2009-07-07 00:55:31 +0200
commit4673fd3ca06010e74f8223486b0f34e58c7b0a7e (patch)
treecfcc97752fd770eb1befa295e16f7aa4a2607ca9 /src/txt-converter/char/char-converter.c
parent03b5e644857f80a23bd8b856b78a10cf0a564a66 (diff)
downloadtmwa-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/char/char-converter.c')
-rw-r--r--src/txt-converter/char/char-converter.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/txt-converter/char/char-converter.c b/src/txt-converter/char/char-converter.c
index 44f6d29..1890049 100644
--- a/src/txt-converter/char/char-converter.c
+++ b/src/txt-converter/char/char-converter.c
@@ -666,7 +666,7 @@ int mmo_char_init(void){
input=getchar();
if(input == 'y' || input == 'Y'){
printf("\nConverting Character Database...\n");
- fp=fopen("save/athena.txt","r");
+ fp=fopen_("save/athena.txt","r");
char_dat=malloc(sizeof(char_dat[0])*256);
char_max=256;
if(fp==NULL)
@@ -687,7 +687,7 @@ int mmo_char_init(void){
}
}
printf("char data convert end\n");
- fclose(fp);
+ fclose_(fp);
}
while(getchar() != '\n');
@@ -695,7 +695,7 @@ int mmo_char_init(void){
input=getchar();
if(input == 'y' || input == 'Y') {
printf("\nConverting Storage Database...\n");
- fp=fopen(storage_txt,"r");
+ fp=fopen_(storage_txt,"r");
if(fp==NULL){
printf("cant't read : %s\n",storage_txt);
return 0;
@@ -716,7 +716,7 @@ int mmo_char_init(void){
i++;
}
}
- fclose(fp);
+ fclose_(fp);
}
while(getchar() != '\n');
@@ -724,7 +724,7 @@ int mmo_char_init(void){
input=getchar();
if(input == 'y' || input == 'Y') {
printf("\nConverting Pet Database...\n");
- if( (fp=fopen(pet_txt,"r")) ==NULL )
+ if( (fp=fopen_(pet_txt,"r")) ==NULL )
return 1;
p=malloc(sizeof(struct s_pet));
@@ -741,7 +741,7 @@ int mmo_char_init(void){
}
c++;
}
- fclose(fp);
+ fclose_(fp);
}
return 0;
@@ -752,7 +752,7 @@ int inter_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);
return 1;
@@ -790,7 +790,7 @@ int inter_config_read(const char *cfgName) {
printf ("set db_server_logindb : %s\n",w2);
}
}
- fclose(fp);
+ fclose_(fp);
printf ("success reading interserver configuration\n");
@@ -803,7 +803,7 @@ int char_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);
return 1;
@@ -821,7 +821,7 @@ int char_config_read(const char *cfgName) {
strcpy(char_txt, w2);
}
}
- fclose(fp);
+ fclose_(fp);
printf("reading configure done.....\n");
return 0;