Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
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, Sogou, Google

Members: 0
Guests: 2
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
Vintar (28)
Related Links
» SmaugMuds.org » General » Smaug Snippets » Problem with Pfile Auto-Pruner
Forum Rules | Mark all | Recent Posts

Problem with Pfile Auto-Pruner
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Nov 6, 2006, 8:11 am   Last edited Nov 6, 2006, 8:13 am by ToadVile
Go to the top of the page
Go to the bottom of the page

ToadVile

GroupMembers
Posts47
JoinedApr 1, 2006

Alright, I've come to a conclusion :)

When you have a pfile thats old, it gets deleted by the auto-pruner, it'd show up as

Log: Player autoexits blank automap combine prompt ansi autogold compass was deleted. Exceeded time limit of 30 days.


I've found the problem, found how it can be fixed :)

in pfiles.c, in fread_pfile

Find:

            KEY( "Name", name, fread_flagstring( fp ) );


Replace that with:
            KEY("Name", name, fread_string(fp));


That'll make it so it shows up as

Log: Player Torgth was deleted. Exceeded time limit of 30 days.


Peace, Laterz.
       
Post is unread #2 Nov 6, 2006, 8:48 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Right up until you leak the memory from the fread_string call you haven't provided a STRFREE for :)
       
Post is unread #3 Nov 6, 2006, 12:48 pm
Go to the top of the page
Go to the bottom of the page

ToadVile

GroupMembers
Posts47
JoinedApr 1, 2006

Bleh :P
       
Post is unread #4 Nov 7, 2006, 1:07 am
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Hey now, at least he was on the right track there. :lol:
It really looks like a pretty good fix if you also throw in a STRFREE for it, which isn't that much extra really. :wink:
       
Pages:<< prev 1 next >>