diff options
author | Peter Somogyi <psomogyi@gamax.hu> | 2007-02-14 18:58:20 +0100 |
---|---|---|
committer | Peter Somogyi <psomogyi@gamax.hu> | 2007-02-14 18:58:20 +0100 |
commit | 1c8bcd6f5718a675f8a382d143d82871aac85296 (patch) | |
tree | cd39c6231d97526ee9027209c1d9ff0fe0406d55 /ctdb/ib/ibw_ctdb.c | |
parent | 8b6f1c39e7b8b423e28fbfed09577d8e7f9d1de0 (diff) | |
download | samba-1c8bcd6f5718a675f8a382d143d82871aac85296.tar.gz |
ib: a trivial approach of integration
TODO: bugfix (not yet complete, something happens differently than expected
at tcpip when connection is refused in the beginning)
(This used to be ctdb commit 330d76fb91f717d4fb8d1be29c11ddf8c25a4f1c)
Diffstat (limited to 'ctdb/ib/ibw_ctdb.c')
-rw-r--r-- | ctdb/ib/ibw_ctdb.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/ctdb/ib/ibw_ctdb.c b/ctdb/ib/ibw_ctdb.c index 4379cb75086..5152062d246 100644 --- a/ctdb/ib/ibw_ctdb.c +++ b/ctdb/ib/ibw_ctdb.c @@ -63,19 +63,24 @@ int ctdb_ibw_connstate_handler(struct ibw_ctx *ctx, struct ibw_conn *conn) break; case IBWC_CONNECTED: { /* after ibw_accept or ibw_connect */ struct ctdb_node *node = talloc_get_type(conn->conn_userdata, struct ctdb_node); - if (node!=NULL) /* after ibw_connect */ + if (node!=NULL) { /* after ibw_connect */ + node->private = (void *)conn; node->ctdb->upcalls->node_connected(node); - else { /* after ibw_accept */ + } else { /* after ibw_accept */ /* NOP in CTDB case */ } } break; - case IBWC_DISCONNECTED: /* after ibw_disconnect */ + case IBWC_DISCONNECTED: { /* after ibw_disconnect */ /* TODO: have a CTDB upcall */ - break; - case IBWC_ERROR: { struct ctdb_node *node = talloc_get_type(conn->conn_userdata, struct ctdb_node); if (node!=NULL) - node->ctdb->upcalls->node_connected(node); + node->ctdb->upcalls->node_dead(node); + talloc_free(conn); + } break; + case IBWC_ERROR: { +/* struct ctdb_node *node = talloc_get_type(conn->conn_userdata, struct ctdb_node); + if (node!=NULL) + node->ctdb->upcalls->node_dead(node);*/ } break; default: assert(0); |