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.
This commit is contained in:
parent
eea9e76bf8
commit
940092ffb9
1 changed files with 9 additions and 0 deletions
|
@ -139,8 +139,11 @@ int
|
||||||
check_loan_ok(struct lonstr *loanp)
|
check_loan_ok(struct lonstr *loanp)
|
||||||
{
|
{
|
||||||
struct lonstr chkloan;
|
struct lonstr chkloan;
|
||||||
|
struct lonstr tloan;
|
||||||
|
|
||||||
getloan(loanp->l_uid, &chkloan);
|
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))) {
|
if (memcmp(loanp, &chkloan, sizeof(struct lonstr))) {
|
||||||
pr("Loan %d has changed!\n", loanp->l_uid);
|
pr("Loan %d has changed!\n", loanp->l_uid);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -152,8 +155,11 @@ int
|
||||||
check_comm_ok(struct comstr *commp)
|
check_comm_ok(struct comstr *commp)
|
||||||
{
|
{
|
||||||
struct comstr chkcomm;
|
struct comstr chkcomm;
|
||||||
|
struct comstr tcomm;
|
||||||
|
|
||||||
getcomm(commp->com_uid, &chkcomm);
|
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))) {
|
if (memcmp(commp, &chkcomm, sizeof(struct comstr))) {
|
||||||
pr("Commodity %d has changed!\n", commp->com_uid);
|
pr("Commodity %d has changed!\n", commp->com_uid);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -165,8 +171,11 @@ int
|
||||||
check_trade_ok(struct trdstr *tp)
|
check_trade_ok(struct trdstr *tp)
|
||||||
{
|
{
|
||||||
struct trdstr chktrade;
|
struct trdstr chktrade;
|
||||||
|
struct trdstr ttrade;
|
||||||
|
|
||||||
gettrade(tp->trd_uid, &chktrade);
|
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))) {
|
if (memcmp(tp, &chktrade, sizeof(struct trdstr))) {
|
||||||
pr("Trade lot #%d has changed!\n", tp->trd_uid);
|
pr("Trade lot #%d has changed!\n", tp->trd_uid);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue