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 ➜ ROM ➜ Running the server ➜ 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 page


Pages: 1  2 

Posted by Nick Gammon   Australia  (23,165 posts)  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
Top

Posted by YoshoFyre   (29 posts)  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
Top

Posted by YoshoFyre   (29 posts)  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();
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.


76,530 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 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.