fix logic to ensure that we do not call the callback after the iteration was aborted (caused big trouble in wirewatcher)
This commit is contained in:
parent
10c56bcea0
commit
2021f75995
@ -113,12 +113,18 @@ parse_account_history (struct TALER_BANK_CreditHistoryHandle *hh,
|
|||||||
GNUNET_break_op (0);
|
GNUNET_break_op (0);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
hh->hcb (hh->hcb_cls,
|
if (GNUNET_OK !=
|
||||||
MHD_HTTP_OK,
|
hh->hcb (hh->hcb_cls,
|
||||||
TALER_EC_NONE,
|
MHD_HTTP_OK,
|
||||||
row_id,
|
TALER_EC_NONE,
|
||||||
&td,
|
row_id,
|
||||||
transaction);
|
&td,
|
||||||
|
transaction))
|
||||||
|
{
|
||||||
|
hh->hcb = NULL;
|
||||||
|
GNUNET_JSON_parse_free (hist_spec);
|
||||||
|
return GNUNET_OK;
|
||||||
|
}
|
||||||
GNUNET_JSON_parse_free (hist_spec);
|
GNUNET_JSON_parse_free (hist_spec);
|
||||||
}
|
}
|
||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
@ -195,12 +201,13 @@ handle_credit_history_finished (void *cls,
|
|||||||
response_code = 0;
|
response_code = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
hh->hcb (hh->hcb_cls,
|
if (NULL != hh->hcb)
|
||||||
response_code,
|
hh->hcb (hh->hcb_cls,
|
||||||
ec,
|
response_code,
|
||||||
0LLU,
|
ec,
|
||||||
NULL,
|
0LLU,
|
||||||
j);
|
NULL,
|
||||||
|
j);
|
||||||
TALER_BANK_credit_history_cancel (hh);
|
TALER_BANK_credit_history_cancel (hh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,12 +115,18 @@ parse_account_history (struct TALER_BANK_DebitHistoryHandle *hh,
|
|||||||
GNUNET_break_op (0);
|
GNUNET_break_op (0);
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
hh->hcb (hh->hcb_cls,
|
if (GNUNET_OK !=
|
||||||
MHD_HTTP_OK,
|
hh->hcb (hh->hcb_cls,
|
||||||
TALER_EC_NONE,
|
MHD_HTTP_OK,
|
||||||
row_id,
|
TALER_EC_NONE,
|
||||||
&td,
|
row_id,
|
||||||
transaction);
|
&td,
|
||||||
|
transaction))
|
||||||
|
{
|
||||||
|
hh->hcb = NULL;
|
||||||
|
GNUNET_JSON_parse_free (hist_spec);
|
||||||
|
return GNUNET_OK;
|
||||||
|
}
|
||||||
GNUNET_JSON_parse_free (hist_spec);
|
GNUNET_JSON_parse_free (hist_spec);
|
||||||
}
|
}
|
||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
@ -199,12 +205,13 @@ handle_debit_history_finished (void *cls,
|
|||||||
response_code = 0;
|
response_code = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
hh->hcb (hh->hcb_cls,
|
if (NULL != hh->hcb)
|
||||||
response_code,
|
hh->hcb (hh->hcb_cls,
|
||||||
ec,
|
response_code,
|
||||||
0LLU,
|
ec,
|
||||||
NULL,
|
0LLU,
|
||||||
j);
|
NULL,
|
||||||
|
j);
|
||||||
TALER_BANK_debit_history_cancel (hh);
|
TALER_BANK_debit_history_cancel (hh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user