]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
nest/proto fix local_debug mode
authorPavel Tvrdík <pawel.tvrdik@gmail.com>
Wed, 9 Mar 2016 10:03:49 +0000 (11:03 +0100)
committerPavel Tvrdík <pawel.tvrdik@gmail.com>
Thu, 10 Mar 2016 15:07:44 +0000 (16:07 +0100)
nest/proto.c

index 5b55f9eee07644dd2aff8f3ba60241a4c6cdf304..f712fe5f4e7153743c3e9ee8d6116195fbe23bf0 100644 (file)
@@ -39,6 +39,12 @@ static int graceful_restart_state;
 static u32 graceful_restart_locks;
 
 static char *p_states[] = { "DOWN", "START", "UP", "STOP" };
+static char *cs_states[] = {
+    [CS_DOWN] = "DOWN",
+    [CS_START] = "START",
+    [CS_UP] = "UP",
+    [CS_FLUSHING] = "FLUSHING"
+};
 
 extern struct protocol proto_unix_iface;
 
@@ -313,7 +319,7 @@ channel_set_state(struct channel *c, uint state)
   uint cs = c->channel_state;
   uint es = c->export_state;
 
-  DBG("%s reporting state transition %s/%s -> */%s\n", p->name, c_states[cs], p_states[ops], p_states[ps]);
+  DBG("%s reporting channel %s state transition %s -> %s\n", c->proto->name, c->name, cs_states[cs], cs_states[state]);
   if (state == cs)
     return;