aboutsummaryrefslogtreecommitdiff
path: root/src/zdab-cat.c
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-07-16 11:33:51 -0500
committertlatorre <tlatorre@uchicago.edu>2019-07-16 11:33:51 -0500
commit58970d8d7dbc44b2e479f2e61e662dcf8e323526 (patch)
treebdc395248b319b79019e7b13208958221cbffa84 /src/zdab-cat.c
parent94d44ab09924a7183f355dd0148204caed9b9e77 (diff)
downloadsddm-58970d8d7dbc44b2e479f2e61e662dcf8e323526.tar.gz
sddm-58970d8d7dbc44b2e479f2e61e662dcf8e323526.tar.bz2
sddm-58970d8d7dbc44b2e479f2e61e662dcf8e323526.zip
fix bug introduced in ebe2799
This commit fixes a bug introduced in a previous commit when I moved all the code to add the run, gtid, etc. to the event object to get_event(). We actually need the run number before then to load the DQXX file for the right run.
Diffstat (limited to 'src/zdab-cat.c')
-rw-r--r--src/zdab-cat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/zdab-cat.c b/src/zdab-cat.c
index fa779e9..009fdf8 100644
--- a/src/zdab-cat.c
+++ b/src/zdab-cat.c
@@ -278,10 +278,10 @@ skip_mc:
while (1) {
unpack_ev(b.data, &bev);
- if (ev.run != last_run) {
- fprintf(stderr, "loading DQXX file for run %010i\n", ev.run);
+ if (bev.run != last_run) {
+ fprintf(stderr, "loading DQXX file for run %010i\n", bev.run);
- sprintf(dqxx_file, "DQXX_%010i.dat", ev.run);
+ sprintf(dqxx_file, "DQXX_%010i.dat", bev.run);
if (load_file(db, dqxx_file, 1)) {
fprintf(stderr, "failed to load %s: %s\n", dqxx_file, db_err);
goto err;
@@ -292,7 +292,7 @@ skip_mc:
goto err;
}
- last_run = ev.run;
+ last_run = bev.run;
}
rv = get_event(f,&ev,&b);