Don't open the control socket until after the server socket is bound

This makes it easier for the tests (and supervisor) to guarantee to be
able to connect to the server socket.

Also this patch moves freeing the mirror supervisor into the server
thread.
This commit is contained in:
Alex Young
2012-10-09 17:35:20 +01:00
parent 83eb31aba4
commit 22bea81445
12 changed files with 108 additions and 69 deletions

View File

@@ -22,7 +22,7 @@ START_TEST( test_gets_has_control )
struct server server;
struct status * status;
server.has_control = 1;
server.success = 1;
status = status_create( &server );
fail_unless( status->has_control == 1, "has_control wasn't copied" );
@@ -162,7 +162,7 @@ Suite *status_suite(void)
int main(void)
{
int number_failed;
Suite *s = status_suite();
SRunner *sr = srunner_create(s);
srunner_run_all(sr, CK_NORMAL);