Revert explicit AUDITOR_connect at tests.
This commit is contained in:
parent
222cac2762
commit
220ce20d05
@ -369,6 +369,12 @@ struct TALER_TESTING_Interpreter
|
|||||||
*/
|
*/
|
||||||
int working;
|
int working;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is the auditor running (#GNUNET_YES) or waiting
|
||||||
|
* for /version (#GNUNET_NO)?
|
||||||
|
*/
|
||||||
|
int auditor_working;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How often have we gotten a /keys response so far?
|
* How often have we gotten a /keys response so far?
|
||||||
*/
|
*/
|
||||||
|
@ -645,7 +645,8 @@ parse_json_auditor (struct TALER_EXCHANGE_AuditorInformation *auditor,
|
|||||||
* @param compat protocol compatibility information
|
* @param compat protocol compatibility information
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
auditor_version_cb (void *cls,
|
auditor_version_cb
|
||||||
|
(void *cls,
|
||||||
const struct TALER_AUDITOR_VersionInformation *vi,
|
const struct TALER_AUDITOR_VersionInformation *vi,
|
||||||
enum TALER_AUDITOR_VersionCompatibility compat)
|
enum TALER_AUDITOR_VersionCompatibility compat)
|
||||||
{
|
{
|
||||||
|
@ -98,6 +98,25 @@ struct MainWrapperContext
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function called with information about the auditor.
|
||||||
|
*
|
||||||
|
* @param cls closure
|
||||||
|
* @param vi basic information about the auditor
|
||||||
|
* @param compat protocol compatibility information
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
auditor_version_cb
|
||||||
|
(void *cls,
|
||||||
|
const struct TALER_AUDITOR_VersionInformation *vi,
|
||||||
|
enum TALER_AUDITOR_VersionCompatibility compat)
|
||||||
|
{
|
||||||
|
struct TALER_TESTING_Interpreter *is = cls;
|
||||||
|
|
||||||
|
/* TODO: check vi/compat? */
|
||||||
|
is->auditor_working = GNUNET_YES;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup the @a is 'auditor' member before running the main test loop.
|
* Setup the @a is 'auditor' member before running the main test loop.
|
||||||
*
|
*
|
||||||
@ -124,12 +143,23 @@ auditor_main_wrapper (void *cls,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is->auditor = TALER_AUDITOR_connect (is->ctx,
|
||||||
|
auditor_base_url,
|
||||||
|
&auditor_version_cb,
|
||||||
|
is);
|
||||||
GNUNET_free (auditor_base_url);
|
GNUNET_free (auditor_base_url);
|
||||||
|
|
||||||
|
if (NULL == is->auditor)
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
cc = GNUNET_new (struct CleanupContext);
|
cc = GNUNET_new (struct CleanupContext);
|
||||||
cc->is = is;
|
cc->is = is;
|
||||||
cc->fcb = is->final_cleanup_cb;
|
cc->fcb = is->final_cleanup_cb;
|
||||||
cc->fcb_cls = is->final_cleanup_cb;
|
cc->fcb_cls = is->final_cleanup_cb;
|
||||||
is->final_cleanup_cb = NULL;
|
is->final_cleanup_cb = cleanup_auditor;
|
||||||
is->final_cleanup_cb_cls = cc;
|
is->final_cleanup_cb_cls = cc;
|
||||||
mwc->main_cb (mwc->main_cb_cls,
|
mwc->main_cb (mwc->main_cb_cls,
|
||||||
is);
|
is);
|
||||||
|
Loading…
Reference in New Issue
Block a user