Skip to content

Commit

Permalink
Work
Browse files Browse the repository at this point in the history
Signed-off-by: Cole Miller <cole.miller@canonical.com>
  • Loading branch information
cole-miller committed Oct 8, 2024
1 parent a7a056b commit 0b0b099
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/gateway.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ static void handle_exec_sql_next(struct gateway *g,
static void handle_exec_sql_cb(struct exec *exec, int status)
{
tracef("handle exec sql cb status %d", status);
fprintf(stderr, "[INFO FOR COLE] handle exec sql cb %p %d finalizing\n", exec->stmt, status);
struct gateway *g = exec->data;
struct handle *req = g->req;

Expand Down
10 changes: 8 additions & 2 deletions src/leader.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ void leader__close(struct leader *l)
assert(l->inflight == NULL);
l->exec->status = SQLITE_ERROR;
exec_done(l->exec, 0);

Check warning on line 194 in src/leader.c

View check run for this annotation

Codecov / codecov/patch

src/leader.c#L194

Added line #L194 was not covered by tests
} else {
fprintf(stderr, "[INFO FOR COLE] leader close nothing happening\n");
}
rc = sqlite3_close(l->conn);
if (rc != SQLITE_OK) {
Expand Down Expand Up @@ -457,10 +459,14 @@ static void exec_done(struct exec *req, int asyncness)
}
sm_fini(&req->sm);
req->leader->exec = NULL;
if (req->cb != NULL && asyncness == 0) {
req->cb(req, status);
fprintf(stderr, "[INFO FOR COLE] exec_done clearing %p\n", req->stmt);
if (req->cb == NULL) {
fprintf(stderr, "[INFO FOR COLE] skip callback for %p because cb is NULL\n", req->stmt);

Check warning on line 464 in src/leader.c

View check run for this annotation

Codecov / codecov/patch

src/leader.c#L464

Added line #L464 was not covered by tests
} else if (asyncness != 0) {
fprintf(stderr, "[INFO FOR COLE] skip callback for %p because asyncness is %d\n", req->stmt, asyncness);
} else {
fprintf(stderr, "[INFO FOR COLE] invoke callback for %p\n", req->stmt);
req->cb(req, status);
}
}

Expand Down

0 comments on commit 0b0b099

Please sign in to comment.