Lock around acl updates

This commit is contained in:
Alex Young
2012-06-08 11:02:40 +01:00
parent f7e1a098b1
commit 35ca93b42c
3 changed files with 56 additions and 29 deletions

View File

@@ -7,8 +7,10 @@
START_TEST( test_replaces_acl )
{
struct server s;
struct server s = {0};
s.acl_updated_signal = self_pipe_create();
pthread_mutex_init( &s.l_acl, NULL );
struct acl * acl = acl_create( 0, NULL, 0 );
server_replace_acl( &s, acl );
@@ -21,10 +23,11 @@ END_TEST
START_TEST( test_signals_acl_updated )
{
struct server s;
struct server s = {0};
struct acl * new_acl = acl_create( 0, NULL, 0 );
s.acl_updated_signal = self_pipe_create();
pthread_mutex_init( &s.l_acl, NULL );
s.acl = acl_create( 0, NULL, 0);