summaryrefslogtreecommitdiff
path: root/ctdb/ib
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2014-05-28 10:40:29 +1000
committerAmitay Isaacs <amitay@samba.org>2014-05-29 03:35:54 +0200
commitf2ef23cd5f227d2da2f032a2a56fbdd4d105b137 (patch)
tree6efd6db65ef8c69c1bca4161bc526ed906ae6f38 /ctdb/ib
parenta27e59e8ecb622de826323c048107ab75acd0928 (diff)
downloadsamba-f2ef23cd5f227d2da2f032a2a56fbdd4d105b137.tar.gz
ctdb-ib: Make infiniband transport compile again
Update included header files and fix compilation warnings. ib/ibwrapper.c: In function ‘ibw_stop’: ib/ibwrapper.c:1015:17: warning: comparison between ‘enum ibw_state_ctx’ and ‘enum ibw_state_conn’ [-Wenum-compare] if (ctx->state==IBWC_ERROR || ctx->state==IBWC_CONNECTED) { ^ ib/ibwrapper.c:1015:43: warning: comparison between ‘enum ibw_state_ctx’ and ‘enum ibw_state_conn’ [-Wenum-compare] if (ctx->state==IBWC_ERROR || ctx->state==IBWC_CONNECTED) { The current logic just seems wrong. The context of this line and the error checking in ibw_disconnect() suggest that these comparisons should use p->state rather than ctx->state, so do that. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/ib')
-rw-r--r--ctdb/ib/config.m42
-rw-r--r--ctdb/ib/ibw_ctdb_init.c3
-rw-r--r--ctdb/ib/ibwrapper.c3
-rw-r--r--ctdb/ib/ibwrapper_test.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/ctdb/ib/config.m4 b/ctdb/ib/config.m4
index 47d6facd34f..6c626bdc7fe 100644
--- a/ctdb/ib/config.m4
+++ b/ctdb/ib/config.m4
@@ -1,4 +1,4 @@
-AC_ARG_ENABLE(--enable-infiniband,
+AC_ARG_ENABLE(infiniband,
[ --enable-infiniband Turn on infiniband support (default=no)])
HAVE_INFINIBAND=no
diff --git a/ctdb/ib/ibw_ctdb_init.c b/ctdb/ib/ibw_ctdb_init.c
index 066814d12ff..63deff28430 100644
--- a/ctdb/ib/ibw_ctdb_init.c
+++ b/ctdb/ib/ibw_ctdb_init.c
@@ -26,6 +26,7 @@
#include "ctdb_private.h"
#include "ibwrapper.h"
#include "ibw_ctdb.h"
+#include "lib/util/dlinklist.h"
static int ctdb_ibw_listen(struct ctdb_context *ctdb, int backlog)
{
@@ -99,7 +100,7 @@ static int ctdb_ibw_initialise(struct ctdb_context *ctdb)
*/
static int ctdb_ibw_start(struct ctdb_context *ctdb)
{
- int i, ret;
+ int i;
/* everything async here */
for (i=0;i<ctdb->num_nodes;i++) {
diff --git a/ctdb/ib/ibwrapper.c b/ctdb/ib/ibwrapper.c
index f6e71687f32..3daab3e3c72 100644
--- a/ctdb/ib/ibwrapper.c
+++ b/ctdb/ib/ibwrapper.c
@@ -34,7 +34,6 @@
#include <unistd.h>
#include "includes.h"
-#include "lib/events/events.h"
#include "ibwrapper.h"
#include <infiniband/kern-abi.h>
@@ -1013,7 +1012,7 @@ int ibw_stop(struct ibw_ctx *ctx)
DEBUG(DEBUG_DEBUG, ("ibw_stop\n"));
for(p=ctx->conn_list; p!=NULL; p=p->next) {
- if (ctx->state==IBWC_ERROR || ctx->state==IBWC_CONNECTED) {
+ if (p->state==IBWC_ERROR || p->state==IBWC_CONNECTED) {
if (ibw_disconnect(p))
return -1;
}
diff --git a/ctdb/ib/ibwrapper_test.c b/ctdb/ib/ibwrapper_test.c
index ba54286ace6..48162c328a6 100644
--- a/ctdb/ib/ibwrapper_test.c
+++ b/ctdb/ib/ibwrapper_test.c
@@ -325,7 +325,7 @@ int ibwtest_receive_handler(struct ibw_conn *conn, void *buf, int n)
n - sizeof(uint32_t) - 2);
DEBUG(DEBUG_DEBUG, ("[%d]msg varsize %u/sum %u from %s\n",
op,
- n - sizeof(uint32_t) - 2,
+ (uint32_t)(n - sizeof(uint32_t) - 2),
(uint32_t)sum,
tconn->id ? tconn->id : "NULL"));
if (sum!=((unsigned char *)buf)[n-1]) {