kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 4b7a458de6f5932c16f6b3eda8337d631aa4924c
parent 3f7e7e696e5966cddaa6055f1067914716dca37e
Author: Joris Vink <joris@coders.se>
Date:   Sun, 13 Apr 2014 23:43:54 +0200

If kore_pgsql_query() fails, relay this properly

Diffstat:
includes/contrib/postgres/kore_pgsql.h | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/includes/contrib/postgres/kore_pgsql.h b/includes/contrib/postgres/kore_pgsql.h @@ -46,7 +46,13 @@ char *kore_pgsql_getvalue(struct kore_pgsql *, int, int); #define KORE_PGSQL(r, q, i, s) \ do { \ if (r->pgsql[i] == NULL) \ - kore_pgsql_query(r, q, i); \ + if (!kore_pgsql_query(r, q, i)) { \ + if (r->pgsql[i] == NULL) \ + return (KORE_RESULT_RETRY); \ + s; \ + r->pgsql[i]->state = \ + KORE_PGSQL_STATE_COMPLETE; \ + } \ if (r->pgsql[i] == NULL) \ return (KORE_RESULT_RETRY); \ switch (r->pgsql[i]->state) { \