From 940092ffb95bfab7481b7fa2d99cc6f64454a1bd Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 1 Mar 2009 18:10:45 +0100 Subject: [PATCH] Ignore timestamps in check_loan_ok() & friends check_loan_ok(), check_comm_ok() and check_trade_ok() should have been changed to ignore timestamps when timestamps were added to their files in commit a680c811, v4.3.12. --- src/lib/subs/check.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib/subs/check.c b/src/lib/subs/check.c index 474f0b11..f3d5e71c 100644 --- a/src/lib/subs/check.c +++ b/src/lib/subs/check.c @@ -139,8 +139,11 @@ int check_loan_ok(struct lonstr *loanp) { struct lonstr chkloan; + struct lonstr tloan; getloan(loanp->l_uid, &chkloan); + memcpy(&tloan, loanp, sizeof(struct lonstr)); + tloan.l_timestamp = chkloan.l_timestamp = 0; if (memcmp(loanp, &chkloan, sizeof(struct lonstr))) { pr("Loan %d has changed!\n", loanp->l_uid); return 0; @@ -152,8 +155,11 @@ int check_comm_ok(struct comstr *commp) { struct comstr chkcomm; + struct comstr tcomm; getcomm(commp->com_uid, &chkcomm); + memcpy(&tcomm, commp, sizeof(struct comstr)); + tcomm.com_timestamp = chkcomm.com_timestamp = 0; if (memcmp(commp, &chkcomm, sizeof(struct comstr))) { pr("Commodity %d has changed!\n", commp->com_uid); return 0; @@ -165,8 +171,11 @@ int check_trade_ok(struct trdstr *tp) { struct trdstr chktrade; + struct trdstr ttrade; gettrade(tp->trd_uid, &chktrade); + memcpy(&ttrade, tp, sizeof(struct trdstr)); + ttrade.trd_timestamp = chktrade.trd_timestamp = 0; if (memcmp(tp, &chktrade, sizeof(struct trdstr))) { pr("Trade lot #%d has changed!\n", tp->trd_uid); return 0;