--- lib/rpki/querySupport.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/lib/rpki/querySupport.c b/lib/rpki/querySupport.c index 27f6f92..52a9904 100644 --- a/lib/rpki/querySupport.c +++ b/lib/rpki/querySupport.c @@ -82,13 +82,19 @@ static int registerParent( return 0; } -int checkValidity( - char *ski, - unsigned int localID, - scm * scmp, - scmcon * connect) +/** + * @brief set up main part of query + * + * Global variables are initialized only once, instead of once per + * object. + * + * @param[in] scmp + * Database schema pointer. + */ +static void +initSearch( + scm *scmp) { - // set up main part of query only once, instead of once per object if (validTable == NULL) { validTable = findtablescm(scmp, "certificate"); @@ -136,6 +142,15 @@ int checkValidity( addcolsrchscm(anySrch, "flags", field->sqlType, field->maxSize); } } +} + +int checkValidity( + char *ski, + unsigned int localID, + scm * scmp, + scmcon * connect) +{ + initSearch(scmp); /* FIXME: This code assumes that is suffices to trace a single * parent until one arrives at a trust anchor. This will not -- 2.4.5 ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ rpstir-devel mailing list rpstir-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpstir-devel