Explorar el Código

qnetd: Add ring_id to client structure

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Christine Caulfield hace 10 años
padre
commit
27887779cf
Se han modificado 2 ficheros con 3 adiciones y 0 borrados
  1. 2 0
      qdevices/qnetd-client-msg-received.c
  2. 1 0
      qdevices/qnetd-client.h

+ 2 - 0
qdevices/qnetd-client-msg-received.c

@@ -605,6 +605,8 @@ qnetd_client_msg_received_node_list(struct qnetd_instance *instance, struct qnet
 			return (0);
 		}
 
+		memcpy(&client->last_ring_id, &msg->ring_id, sizeof(struct tlv_ring_id));
+		qnetd_log(LOG_DEBUG, "CC: client %p (nodeid %d) ring id = %d/%ld", client, client->node_id, client->last_ring_id.node_id, client->last_ring_id.seq);
 		reply_error_code = qnetd_algorithm_membership_node_list_received(client,
 		    msg->seq_number, &msg->ring_id, &msg->nodes, &result_vote);
 		break;

+ 1 - 0
qdevices/qnetd-client.h

@@ -73,6 +73,7 @@ struct qnetd_client {
 	struct node_list configuration_node_list;
 	struct node_list last_membership_node_list;
 	struct node_list last_quorum_node_list;
+	struct tlv_ring_id last_ring_id;
 	struct qnetd_cluster *cluster;
 	struct qnetd_cluster_list *cluster_list;
 	TAILQ_ENTRY(qnetd_client) entries;