keepalive: logging state of dest just if changed feature/keepalive-new-state-log-feedback 2352/head
authorLuis Martin Gil <luismartingil@zaleos.net>
Tue, 9 Jun 2020 08:48:16 +0000 (10:48 +0200)
committerLuis Martin Gil <luismartingil@zaleos.net>
Tue, 9 Jun 2020 08:48:16 +0000 (10:48 +0200)
src/modules/keepalive/keepalive_core.c

index 4daa579..36cf81a 100644 (file)
@@ -119,7 +119,6 @@ static void ka_options_callback(
                ka_dest->counter++;
        }
 
-       LM_DBG("new state is: %d\n", state);
        if(state != ka_dest->state) {
                ka_run_route(msg, &uri, state_routes[state]);
 
@@ -127,6 +126,7 @@ static void ka_options_callback(
                        ka_dest->statechanged_clb(&ka_dest->uri, state, ka_dest->user_attr);
                }
 
+               LM_DBG("new state is: %d\n", state);
                ka_dest->state = state;
        }
        if(ka_dest->response_clb != NULL) {