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...
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.
/*
* 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.