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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  ROM
. -> [Folder]  Running the server
. . -> [Subject]  Epic Failure With Copyover (Linux)

Epic Failure With Copyover (Linux)

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


Pages: 1  2 

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #15 on Thu 05 Aug 2010 04:08 AM (UTC)
Message
What is the point of this?


 fCopyOver = TRUE;
  //control = atoi(argv[4]);
  if( !fCopyOver )  /* We have already the port if copyover'ed */
  {
    control = init_socket( argv[4] );
    wwwcontrol = init_socket( wwwport );
  }


You set fCopyOver to TRUE and then immediately test if it is true or not.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by YoshoFyre   (29 posts)  [Biography] bio
Date Reply #16 on Thu 05 Aug 2010 11:16 AM (UTC)
Message
Nick Gammon said:

What is the point of this?


 fCopyOver = TRUE;
  //control = atoi(argv[4]);
  if( !fCopyOver )  /* We have already the port if copyover'ed */
  {
    control = init_socket( argv[4] );
    wwwcontrol = init_socket( wwwport );
  }


You set fCopyOver to TRUE and then immediately test if it is true or not.
i wasn't paying attention when i added if (!copyover) from a few posts back...

so the code is back to

  fCopyOver = TRUE;
  //control = atoi(argv[4]);
  control = init_socket( argv[4] );
  wwwcontrol = init_socket( wwwport );

and i crash on recover with the bind issue. when i get time later on today, i'll gdb the control line and see what happens
[Go to top] top

Posted by YoshoFyre   (29 posts)  [Biography] bio
Date Reply #17 on Thu 05 Aug 2010 10:50 PM (UTC)
Message
Problem Solved!!! Thanks for all the help... i'm sure i'll be back for a few more questions along the way!

heres my final code

  /* Are we recovering from a Hot Reboot? */
  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 hot reboot
  {
    control = init_socket( port );
    wwwcontrol = init_socket( wwwport );
  }
  boot_db();
[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.


55,135 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

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 HostDash]