X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/b5b7e0bfda93e553c04fbf7340551a8cce1d9b44..53fa91bb028fc115847700f9f3640f1b107c4592:/lib/eclient.c diff --git a/lib/eclient.c b/lib/eclient.c index 96df2c0..d784d41 100644 --- a/lib/eclient.c +++ b/lib/eclient.c @@ -884,13 +884,14 @@ static void integer_response_opcallback(disorder_eclient *c, /* for commands with no response */ static void no_response_opcallback(disorder_eclient *c, struct operation *op) { + disorder_eclient_no_response *completed + = (disorder_eclient_no_response *)op->completed; + D(("no_response_callback")); - if(c->rc / 100 == 2) { - if(op->completed) - ((disorder_eclient_no_response *)op->completed)(op->v); - } else - /* TODO don't use protocol_error here */ - protocol_error(c, op, c->rc, "%s: %s", c->ident, c->line); + if(c->rc / 100 == 2) + completed(op->v, NULL); + else + completed(op->v, errorstring(c)); } /* error callback for queue_unmarshall */