From 205690cb7ceb14de5f4478df721a6c1060536924 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 29 Jun 2016 15:44:41 +0200 Subject: irmd: corrected if( statements --- src/irmd/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/irmd/main.c b/src/irmd/main.c index c9e2d9bb..5ff84da1 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -709,7 +709,7 @@ static int registry_add_ap_auto(char * name, a->ap_name = ap_name; a->argv = argv; - if(e->state == REG_NAME_IDLE) + if (e->state == REG_NAME_IDLE) e->state = REG_NAME_AUTO_ACCEPT; list_add(&a->next, &e->auto_ap_info); @@ -741,7 +741,7 @@ static int registry_remove_ap_auto(char * name, list_del(&a->next); - if(e->state == REG_NAME_AUTO_ACCEPT && list_empty(&e->auto_ap_info)) + if (e->state == REG_NAME_AUTO_ACCEPT && list_empty(&e->auto_ap_info)) e->state = REG_NAME_IDLE; return 0; @@ -784,7 +784,7 @@ static struct reg_instance * registry_add_ap_instance(char * name, return NULL; } - if(e->state == REG_NAME_IDLE || e->state == REG_NAME_AUTO_ACCEPT + if (e->state == REG_NAME_IDLE || e->state == REG_NAME_AUTO_ACCEPT || e->state == REG_NAME_AUTO_EXEC) { e->state = REG_NAME_FLOW_ACCEPT; pthread_cond_signal(&e->acc_signal); @@ -1910,7 +1910,7 @@ void * irm_flow_cleaner() IRMD_CLEANUP_TIMER % BILLION}; while (true) { - if(clock_gettime(CLOCK_MONOTONIC, &now) < 0) + if (clock_gettime(CLOCK_MONOTONIC, &now) < 0) LOG_WARN("Failed to get time."); /* cleanup stale PENDING flows */ -- cgit v1.2.3