[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Copyover Question
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Copyover Question

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


Posted by Nick Cash   USA  (626 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] 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
[Go to top] top

Posted by Boborak   USA  (228 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] 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
[Go to top] top

Posted by Boborak   USA  (228 posts)  [Biography] 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 );
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] 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
[Go to top] 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.


4,561 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]