Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Copyover Question

Copyover Question

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Nick Cash   USA  (626 posts)  Bio
Date Sun 18 May 2003 05:04 AM (UTC)
Message
I know I posted on this a while back, but I think I've figured out an accurate way to describe the problem. When I copyover, and everything works, then all players stay connected and are just fine, but the mud stop's opening new connections, thus not allowing players to connect upon warm boot. Anyways, do you know of anyways this could be linked to anything, or where to look at least. Its kinda getting on my nerves, but not using copyover wouldn't be the worst thing in the world.

As always, thanks for the help.

~Nick Cash
http://www.nick-cash.com
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 18 May 2003 06:50 AM (UTC)
Message
The ability to allow new players to connect is handled by the single socket that the MUD is "listening" on. Look very closely at how that is handled after a copyover.

In fact, although I don't know the copyover code at all, that is a socket that could simply be re-established.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Boborak   USA  (228 posts)  Bio
Date Reply #2 on Mon 19 May 2003 06:37 AM (UTC)
Message
look for a line similar to this in your copyover code:

execl( EXE_FILE, "smaug", buf, "copyover", buf2, buf3, (char *)NULL );

If you only have one connection port, it'll likely look almost identical to my line. buf and buf2 (they may be called 'port' and 'control') are the important arguments. Those vars are passed on to your new instance of smaug to use as the port and control respectively. Without them, or if they are set to the wrong values, the mud will be listening on the wrong port for new connections. Hopefully that helps. Also, check comm.c for init_socket this should NOT be executed on copyover.
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #3 on Tue 20 May 2003 03:21 PM (UTC)
Message
That helps me spark some ideas. I just have another question.

execl( EXE_FILE, "smaug", buf, "copyover", buf2, buf3, (char *)NULL );

In that line, in my copyover code, I changed the smaug. Is the smaug the name of the top folder or name of the exe file? I'm running SWR, so mine has a few more buf's, such as buf4, and buf5, but I don't think those would harm anything. Should I take them out since I'm not using them? And should I changed the smaug to my exe filename or top folder?

As always, you have my thanks for all the help. :)

~Nick Cash
http://www.nick-cash.com
Top

Posted by Boborak   USA  (228 posts)  Bio
Date Reply #4 on Tue 20 May 2003 09:16 PM (UTC)
Message
It's the executable. Look directly above the execl line to see what those bufs are being set too. Again, buf and buf2 are the important ones. Here's my modified code.


sprintf( buf,  "%d", port );
sprintf( buf2, "%d", control );
strcpy ( buf3, "-1" );

execl( EXE_FILE, "swreality", buf, "copyover",  buf2, buf3, (char *)NULL );
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #5 on Tue 20 May 2003 11:35 PM (UTC)
Message
Well, I played with it a bit, and both the folder and the executable work, but I left it with the executable. Anyways, the problem turned out to be the extra bufs, such as buf3, buf4, and buf5. All I did is comment out the lines above that gave them values and it worked fine. I completely forgot that since I don't use them, it was assigning values that are nothing since it just copys values from before. I know thats like a jumble of words, but if finally works. Thanks!

~Nick Cash
http://www.nick-cash.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


16,400 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.