From: Amitay Isaacs Date: Fri, 24 Jun 2016 09:22:02 +0000 (+1000) Subject: s3-ctdb: Return an error when unexpected reply is received X-Git-Tag: tdb-1.3.10~714 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=030fd72b32162c556310e09731fcedcb59e8a044;p=thirdparty%2Fsamba.git s3-ctdb: Return an error when unexpected reply is received CTDB can send CTDB_REPLY_ERROR in case it encounters an error condition. This is treated as successful migration as "ret" is not set. Signed-off-by: Amitay Isaacs Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Fri Jun 24 22:39:23 CEST 2016 on sn-devel-144 --- diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 8403b30896f..d073c72df08 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -763,7 +763,12 @@ int ctdbd_migrate(struct ctdbd_connection *conn, uint32_t db_id, TDB_DATA key) } if (hdr->operation != CTDB_REPLY_CALL) { - DEBUG(0, ("received invalid reply\n")); + if (hdr->operation == CTDB_REPLY_ERROR) { + DBG_ERR("received error from ctdb\n"); + } else { + DBG_ERR("received invalid reply\n"); + } + ret = EIO; goto fail; }