error callback. This is actually rather more convenient in reality.
The only place where this matters already has a workaroud to translate
errors back into null values. That isn't removed, but should be some
time.
static void string_response_opcallback(disorder_eclient *c,
struct operation *op) {
D(("string_response_callback"));
- if(c->rc / 100 == 2) {
+ if(c->rc / 100 == 2 || c->rc == 555) {
if(op->completed) {
- if(c->protocol >= 2) {
+ if(c->rc == 555)
+ ((disorder_eclient_string_response *)op->completed)(op->v, NULL);
+ else if(c->protocol >= 2) {
char **rr = split(c->line + 4, 0, SPLIT_QUOTES, 0, 0);
if(rr && *rr)
typedef void disorder_eclient_no_response(void *v);
/* completion callback with no data */
+/** @brief String result completion callback
+ * @param v User data
+ * @param value or NULL
+ *
+ * @p value can be NULL for disorder_eclient_get(),
+ * disorder_eclient_get_global() and disorder_eclient_userinfo().
+ */
typedef void disorder_eclient_string_response(void *v, const char *value);
-/* completion callback with a string result */
typedef void disorder_eclient_integer_response(void *v, long value);
/* completion callback with a integer result */