diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-04-30 15:31:40 +0200 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2007-04-30 15:31:40 +0200 |
commit | 9366120d9229f5bbc70388beb1133d81f9077fff (patch) | |
tree | 0bff58d172ba2462df27b3a2b7315139cd5d41c5 /ctdb/common/ctdb_message.c | |
parent | 4832d8f834ff09dfd1e77d511f065f3fdf06c05e (diff) | |
download | samba-9366120d9229f5bbc70388beb1133d81f9077fff.tar.gz samba-9366120d9229f5bbc70388beb1133d81f9077fff.tar.xz samba-9366120d9229f5bbc70388beb1133d81f9077fff.zip |
changed the way set_call and attach are done so that you can safely
attach to databases after the protocol has started. The daemon
broadcasts information on new databases to the other daemons.
This also eliminates the need for the client to know about the hash
between db name and db_id.
(This used to be ctdb commit 3bad91a9d987d4c09fe3322eac23c2733660ad08)
Diffstat (limited to 'ctdb/common/ctdb_message.c')
-rw-r--r-- | ctdb/common/ctdb_message.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/ctdb/common/ctdb_message.c b/ctdb/common/ctdb_message.c index 11d87b09e7e..abc1fb9dd89 100644 --- a/ctdb/common/ctdb_message.c +++ b/ctdb/common/ctdb_message.c @@ -129,27 +129,7 @@ int ctdb_daemon_send_message(struct ctdb_context *ctdb, uint32_t vnn, r->datalen = data.dsize; memcpy(&r->data[0], data.dptr, data.dsize); - if (vnn != CTDB_BROADCAST_VNN) { - ctdb_queue_packet(ctdb, &r->hdr); - } else { - struct ctdb_node *node; - int i; - - /* this was a broadcast message - loop over all other nodes and send them each a copy - */ - for (i=0; i<ctdb_get_num_nodes(ctdb); i++) { - node=ctdb->nodes[i]; - - /* we do not send the message to ourself */ - if (node && node->vnn!=ctdb->vnn) { - r->hdr.destnode = node->vnn; - ctdb_queue_packet(ctdb, &r->hdr); - } - } - /* also make sure to dispatch the message locally */ - ctdb_dispatch_message(ctdb, srvid, data); - } + ctdb_queue_packet(ctdb, &r->hdr); talloc_free(r); return 0; |