From fc9e038f3f471dffd9f855bb96c0ae48fab93963 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Sat, 20 Mar 2010 15:59:24 +0100 Subject: [PATCH] client: unbreak SET_KEY and DELETE_KEY In 70bcea3, I introduced incorrect handling of SET_KEY and DELETE_KEY, leading to error on each connection. Fix this by negating the condition. --- sync/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sync/device.c b/sync/device.c index 35d3120..23ba492 100644 --- a/sync/device.c +++ b/sync/device.c @@ -251,11 +251,11 @@ void sync_update(struct sync_device *d, double row) switch (cmd) { case SET_KEY: - if (hanle_set_key_cmd(d->sock, &d->data)) + if (!hanle_set_key_cmd(d->sock, &d->data)) goto sockerr; break; case DELETE_KEY: - if (hanle_del_key_cmd(d->sock, &d->data)) + if (!hanle_del_key_cmd(d->sock, &d->data)) goto sockerr; break; case SET_ROW: