From ba99adb890ac823ec5505861071f03ebcb889ac1 Mon Sep 17 00:00:00 2001 From: Michael McVady Date: Mon, 15 Nov 2021 22:02:53 -0500 Subject: Disable seccomp/add seccomp tracing --- src/clog.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/clog.c b/src/clog.c index 9bce41c..ea5c9b2 100644 --- a/src/clog.c +++ b/src/clog.c @@ -31,8 +31,8 @@ int page(struct http_request *req) /* sql stuff */ struct kore_pgsql sql; - // char *name; - // int rows, i; + char *name; + int rows, i; /* req->status = HTTP_STATUS_INTERNAL_ERROR; */ @@ -55,23 +55,23 @@ int page(struct http_request *req) kore_log(1, "here!"); -// /* -// * Now we can fire off the query, once it returns we either have -// * a result on which we can operate or an error occurred. -// */ -// if (!kore_pgsql_query(&sql, "SELECT * FROM coders")) { -// kore_pgsql_logerror(&sql); -// goto out; -// } -// -// /* -// * Iterate over the result and dump it to somewhere. -// */ -// rows = kore_pgsql_ntuples(&sql); -// for (i = 0; i < rows; i++) { -// name = kore_pgsql_getvalue(&sql, i, 0); -// kore_log(LOG_NOTICE, "name: '%s'", name); -// } + /* + * Now we can fire off the query, once it returns we either have + * a result on which we can operate or an error occurred. + */ + if (!kore_pgsql_query(&sql, "SELECT * FROM entries")) { + kore_pgsql_logerror(&sql); + goto out; + } + + /* + * Iterate over the result and dump it to somewhere. + */ + rows = kore_pgsql_ntuples(&sql); + for (i = 0; i < rows; i++) { + name = kore_pgsql_getvalue(&sql, i, 0); + kore_log(LOG_NOTICE, "name: '%s'", name); + } out: ; -- cgit v1.2.3