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.
 Entire forum ➜ ROM ➜ Running the server ➜ CopyOver QuickMud

CopyOver QuickMud

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


Posted by Stainless   (2 posts)  Bio
Date Sat 19 Oct 2019 10:42 PM (UTC)

Amended on Mon 21 Oct 2019 02:17 PM (UTC) by Fiendish

Message
I had noticed a lot of folks including myself are stumped on getting copyover to work in QuickMud.. I compile with cygwin under windows 10. When I run the Copyover I get infinite loop which creates a HUGE log file.. I noticed Yosh conversed with you a bit until he got it to work.. I'm kinda stumped learning this stuff myself. But what I was able to piece together is this in Comm.C...

    /*
     * Get the port number.
     */
    port = 7000;
	wwwport = 7001;
	
    if (argc > 1)
    {
        if (!is_number (argv[1]))
        {
            fprintf (stderr, "Usage: %s [port #]\n", argv[0]);
            exit (1);
        }
        else if ((port = atoi (argv[1])) <= 1024)
        {
            fprintf (stderr, "Port number must be above 1024.\n");
            exit (1);
        }

		/* Are we recovering from a CopyOver? */
        if (argv[3] && argv[3][0])
        {
            fCopyOver = TRUE;
            control = atoi(argv[4]);
            //wwwcontrol = init_socket( wwwport ); //lets comment this out for a bug test
        }
        else
        fCopyOver = FALSE;

/*********************************************************/

        if (!fCopyOver) //--- we don't need to set the controls if its CopyOver
        {
            control = init_socket( port );
            wwwcontrol = init_socket( wwwport );
        }
        boot_db();
    }

    /*
     * Run the game.
     */
	 
#if defined(macintosh) || defined(MSDOS)
    qmconfig_read(); /* Here because it fits, no conflicts with Linux placement -- JR 05/06/01 */
    boot_db ();
    log_string ("WarpMud is ready to rock.");
    game_loop_mac_msdos ();
#endif

#if defined(unix)

    qmconfig_read(); /* Here so we can set the IP adress. -- JR 05/06/01 */
    if (!fCopyOver)
        control = init_socket ( wwwport );

    boot_db ();
    logfi ("WarpMud is ready to rock on port %d (%s).", wwwport, mud_ipaddress);

#ifdef BIT_COMPILE
    {
	AREA_DATA *pArea;
		for( pArea = area_first; pArea; pArea = pArea->next )
	    	save_area( pArea );
	}

    fprintf( stderr, "Conversions Complete.\n"
    				"Please recompile without -DBIT_COMPILE.\n" );
    exit(0);
#endif

    if (fCopyOver)
        copyover_recover ();

    game_loop_unix (control);
    close (control);
#endif

    /*
     * That's all, folks.
     */
    log_string ("Normal termination of game.");
    exit (0);
    return 0;
}

Do you see anything wrong with how I implemented the code? Sloppy of course but considering my C level of coding = Snippets level.. haha I'm learning though.. I have not compiled this yet just would like a programmer's opinion. I was trying to figure out how he defined the port and wwwport until I seen a little more of the code.
Top

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #1 on Mon 21 Oct 2019 07:08 AM (UTC)
Message
Stainless said:

When I run the Copyover I get infinite loop which creates a HUGE log file..


OK - what is in the log file? Not all of it, but I presume there are a lot of repeated lines. What do they say? (a sample)

- Nick Gammon

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

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #2 on Mon 21 Oct 2019 02:18 PM (UTC)

Amended on Mon 21 Oct 2019 02:48 PM (UTC) by Fiendish

Message
Quote:
Do you see anything wrong with how I implemented the code?

Yes, several things. I can't tell you what fixes to make unless you link to the original code and then clearly delineate which parts are your modifications, but here are the things I notice...


You check only if argc > 1 but then access argv at indices 3 and 4.

What is at argv[3][0]?

You call boot_db inside the arg parsing block, and then call it again immediately afterward in your #if blocks.

You don't `init_socket` or pass `control` into game_loop_mac_msdos.

First you set control = init_socket( port ) in your arg block and then you set control = init_socket ( wwwport ) in #if unix.

You never use wwwcontrol.

Quote:
I was able to piece together is this in Comm.C...

The code you show here looks substatntially different from https://github.com/avinson/rom24-quickmud/blob/master/src/comm.c#L401-L472
Why? Based on what decisions?

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Stainless   (2 posts)  Bio
Date Reply #3 on Tue 29 Oct 2019 10:32 PM (UTC)
Message
I found a new release of QuickMud. All is well. Thanks for your time!
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.


12,390 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.