Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Development
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Google, Bing, DotBot

Members: 0
Guests: 19
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,397
640
KieraZajac
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SmaugFUSS Bugfix List » [Bug] The tongues.dat file is...
Forum Rules | Mark all | Recent Posts

[Bug] The tongues.dat file is never closed by load_tongues
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Mar 5, 2005, 3:58 pm   Last edited May 11, 2005, 6:39 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,644
JoinedJan 1, 2002

Bug: The tongues.dat file is never closed by load_tongues.
Danger: High
Found by: Samson
Fixed by: Samson
-----
[tables.c]

In the load_tongues function find:

	word = fread_word(fp);
	if (!str_cmp(word, "end";))
     return;
	fread_to_eol(fp);
	CREATE(lng, LANG_DATA, 1);
	lng->name = STRALLOC(word);
	fread_cnv(fp, &lng->first_precnv, &lng->last_precnv);
	lng->alphabet = fread_string(fp);
	fread_cnv(fp, &lng->first_cnv, &lng->last_cnv);
	fread_to_eol(fp);
	LINK(lng, first_lang, last_lang, next, prev);
    }
    return;


Replace the first return with break, and above the second return add:

    fclose(fp);
    fp=NULL;


This error was quite possibly reported in the past but no information on it can be found in the SML archives, nor do I recall who may have reported it the first time. For a stock MUD, this is of little consequence and would only be a very minor annoyance. For MUDs which have added copyover/hotboot, it becomes a serious issue since each open descritptor is carried over. The more copyovers that are done, the more open file descritptors there are. This could eventually lead to major problems with the machine the MUD is hosted on if it is never hard-rebooted or crashed.
       
Pages:<< prev 1 next >>