Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Yandex

Members: 0
Guests: 16
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
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,639
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 >>