diff options
author | tlatorre <tlatorre@uchicago.edu> | 2019-07-16 11:33:51 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2019-07-16 11:33:51 -0500 |
commit | 58970d8d7dbc44b2e479f2e61e662dcf8e323526 (patch) | |
tree | bdc395248b319b79019e7b13208958221cbffa84 /src | |
parent | 94d44ab09924a7183f355dd0148204caed9b9e77 (diff) | |
download | sddm-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')
-rw-r--r-- | src/fit.c | 8 | ||||
-rw-r--r-- | src/zdab-cat.c | 8 |
2 files changed, 8 insertions, 8 deletions
@@ -6163,10 +6163,10 @@ skip_mc: if (gtid > 0 && ev.gtid != gtid) goto skip_event; - if (ev.run != last_run) { - printf("loading DQXX file for run %010i\n", ev.run); + if (bev.run != last_run) { + printf("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; @@ -6177,7 +6177,7 @@ skip_mc: goto err; } - last_run = ev.run; + last_run = bev.run; } if (get_event(f,&ev,&b)) goto skip_event; 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); |