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, Yandex, Majestic-12

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
481
3,737
19,381
619
Alexander
Today's Birthdays
Xerix (35)
Related Links
» SmaugMuds.org » Codebases » SWR FUSS » Hotboot bug with d->user
Forum Rules | Mark all | Recent Posts

Hotboot bug with d->user
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Oct 12, 2009, 7:23 am   Last edited Oct 12, 2009, 7:26 am by Banner
Go to the top of the page
Go to the bottom of the page

Banner
Magician
GroupMembers
Posts169
JoinedNov 29, 2005

Hotboot doesn't save the d->user variable, so it turns up as null after a hotboot which caused a few crashes for me until I found the problem.

Find, in do_hotboot:
/*                      For test purposes
                        flush_buffer(d, TRUE);*/
         fprintf( fp, "%d %d %d %d %s %s\n", d->descriptor, och->in_room->vnum, d->port, d->idle, och->name, d->host);
         /*
          * One of two places this gets changed
          */
         och->pcdata->hotboot = TRUE;
         save_char_obj( och );
         write_to_descriptor( d->descriptor, buf, 0 );
      }
   }


Make it so:
fprintf( fp, "%d %d %d %d %s %s %s\n", d->descriptor, och->in_room->vnum, d->port, d->idle, och->name, d->host, d->user);


Find, in hotboot_recover:
/* Recover from a hotboot - load players */
void hotboot_recover( void )
{
   DESCRIPTOR_DATA *d = NULL;
   FILE *fp;
   char name[100];
   char host[MAX_STRING_LENGTH];
   int desc, room, dport, idle, maxp = 0;
   bool fOld;


And:

     fscanf( fp, "%d %d %d %d %s %s\n", &desc, &room, &dport, &idle, name, host );



And:

      d->host = STRALLOC( host );  
      d->port = dport;
      d->idle = idle;
      LINK( d, first_descriptor, last_descriptor, next, prev );
      d->connected = CON_COPYOVER_RECOVER;   /* negative so close_socket will cut them off */


Make it so:

   DESCRIPTOR_DATA *d = NULL;
   FILE *fp;
   char name[100];
   char host[MAX_STRING_LENGTH], user[MAX_STRING_LENGTH];
   int desc, room, dport, idle, maxp = 0;
   bool fOld;



And:

     fscanf( fp, "%d %d %d %d %s %s %s\n", &desc, &room, &dport, &idle, name, host, user );


And:

      d->host = STRALLOC( host );  
      d->user = STRALLOC( user );
      d->port = dport;
      d->idle = idle;
      LINK( d, first_descriptor, last_descriptor, next, prev );
      d->connected = CON_COPYOVER_RECOVER;   /* negative so close_socket will cut them off */


You will need to reboot instead of using hotboot as recover will be attempting to read an extra variable that was not saved yet.
       
Post is unread #2 Oct 12, 2009, 9:08 am
Go to the top of the page
Go to the bottom of the page

Keirath
Magician
GroupMembers
Posts144
JoinedJan 24, 2008

There is no d->user in SWRFUSS that I can find.
       
Post is unread #3 Oct 12, 2009, 10:19 am   Last edited Oct 12, 2009, 10:20 am by Caius
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006

The 'user' string in DESCRIPTOR_DATA appears in the original SWR, but has been removed in the FUSS version.
       
Post is unread #4 Oct 12, 2009, 11:06 am
Go to the top of the page
Go to the bottom of the page

Banner
Magician
GroupMembers
Posts169
JoinedNov 29, 2005


Caius said:

The 'user' string in DESCRIPTOR_DATA appears in the original SWR, but has been removed in the FUSS version.

Ah, then that would explain that away, so this doesn't pertain to recent versions.

Thanks Caius.
       
Post is unread #5 Oct 12, 2009, 11:55 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

One of the reasons it's too bad we didn't have SVN going back further than we do. We'd be able to look and see when this might have been done and maybe then remember why :)
       
Post is unread #6 Oct 12, 2009, 12:12 pm
Go to the top of the page
Go to the bottom of the page

Banner
Magician
GroupMembers
Posts169
JoinedNov 29, 2005


Samson said:

One of the reasons it's too bad we didn't have SVN going back further than we do. We'd be able to look and see when this might have been done and maybe then remember why :)

So I take it it'd probably be a good idea to remove it from my code? I've never really seen it do anything as it always says unknown.
       
Post is unread #7 Oct 12, 2009, 12:26 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

That's probably why we (or I) took it out at some point. It didn't seem to have a purpose.

Oh wait. it just clicked. I bet it's a leftover from when the identd code was removed.
       
Pages:<< prev 1 next >>