aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlibapi
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlibapi')
-rw-r--r--src/vlibapi/api.h3
-rw-r--r--src/vlibapi/api_shared.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/src/vlibapi/api.h b/src/vlibapi/api.h
index b40ece15..2cbeb63c 100644
--- a/src/vlibapi/api.h
+++ b/src/vlibapi/api.h
@@ -189,6 +189,9 @@ typedef struct
char *region_name;
char *root_path;
+
+ /* Replay in progress? */
+ int replay_in_progress;
} api_main_t;
extern api_main_t api_main;
diff --git a/src/vlibapi/api_shared.c b/src/vlibapi/api_shared.c
index 79921afe..69ba10c1 100644
--- a/src/vlibapi/api_shared.c
+++ b/src/vlibapi/api_shared.c
@@ -890,6 +890,9 @@ vl_msg_api_process_file (vlib_main_t * vm, u8 * filename,
msg += size;
}
+ if (which == REPLAY)
+ am->replay_in_progress = 1;
+
for (; i <= last_index; i++)
{
trace_cfg_t *cfgp;
@@ -914,6 +917,7 @@ vl_msg_api_process_file (vlib_main_t * vm, u8 * filename,
vlib_cli_output (vm, "Ugh: msg id %d no trace config\n", msg_id);
munmap (hp, file_size);
vec_free (tmpbuf);
+ am->replay_in_progress = 0;
return;
}
@@ -937,6 +941,7 @@ vl_msg_api_process_file (vlib_main_t * vm, u8 * filename,
vlib_cli_output (vm, "Ugh: msg id %d no endian swap\n", msg_id);
munmap (hp, file_size);
vec_free (tmpbuf);
+ am->replay_in_progress = 0;
return;
}
endian_fp = am->msg_endian_handlers[msg_id];
@@ -1038,6 +1043,7 @@ vl_msg_api_process_file (vlib_main_t * vm, u8 * filename,
munmap (hp, file_size);
vec_free (tmpbuf);
+ am->replay_in_progress = 0;
}
u8 *