Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
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
LoP 1.46
Author: Remcon
Submitted by: Remcon
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
Users Online
CommonCrawl, Yandex, Yahoo!, Bing

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
614
BenitoVirg
Today's Birthdays
There are no member birthdays today.
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,639
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 >>