From 263b91f277e27dce4a35a2678d0024c0dcd5e603 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Mon, 12 Jul 2004 21:40:31 +0000 Subject: [PATCH] Auto merged 2004/07/12 14:37:13-07:00 mvista.com!sdake When a processor left the membership, the next configuration would sometimes cause a form token timeout. While not particularly harmful, it was wasteful and not part of the original design of the group messaging protocol. There was some extra junk code that was added to workaround some other bug that has since been fixed. This junk code removed and now the form token never times out (woohoo). Also removed some extra code that calculates the next ORF processor twice. We only really need to do it once. (Logical change 1.33) git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@100 fd59a12c-fef9-0310-b244-a6a79926bd2f --- exec/gmi.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/exec/gmi.c b/exec/gmi.c index 19f48c13..096637b4 100644 --- a/exec/gmi.c +++ b/exec/gmi.c @@ -1531,6 +1531,7 @@ void timer_function_token_retransmit_timeout (void *data) void timer_function_form_token_timeout (void *data) { +exit (1); gmi_log_printf (gmi_log_level_warning, "Token loss in FORM state\n"); memb_list_entries = 1; @@ -2733,29 +2734,15 @@ static int message_handler_memb_attempt_join ( int iov_len, int bytes_received) { - int token_lost; int found; int i; gmi_log_printf (gmi_log_level_notice, "Got attempt join from %s\n", inet_ntoa (system_from->sin_addr)); - for (token_lost = 0, i = 0; i < memb_list_entries; i++) { - if (memb_list[i].sin_addr.s_addr == system_from->sin_addr.s_addr && - memb_conf_id.rep.s_addr != system_from->sin_addr.s_addr) { - gmi_log_printf (gmi_log_level_debug, "ATTEMPT JOIN, token lost, taking attempt join msg.\n"); - poll_timer_delete (*gmi_poll_handle, timer_orf_token_timeout); - timer_orf_token_timeout = 0; - memb_conf_id.rep.s_addr = memb_local_sockaddr_in.sin_addr.s_addr; - token_lost = 1; - break; - } - } - /* * Not representative */ - if (token_lost == 0 && - memb_conf_id.rep.s_addr != memb_local_sockaddr_in.sin_addr.s_addr) { + if (memb_conf_id.rep.s_addr != memb_local_sockaddr_in.sin_addr.s_addr) { gmi_log_printf (gmi_log_level_notice, "not the rep for this ring, not handling attempt join.\n"); return (0); @@ -2992,18 +2979,6 @@ printf ("setting barrier seq to %d\n", gmi_barrier_seq); printf ("setting barrier seq to %d\n", gmi_barrier_seq); gmi_original_arut = gmi_arut; - /* - * Determine next ORF target - */ - for (i = 0; i < memb_form_token.member_list_entries; i++) { - if (memb_local_sockaddr_in.sin_addr.s_addr == memb_form_token.member_list[i].s_addr) { - memb_next.sin_addr.s_addr = - memb_form_token.member_list[(i + 1) % memb_form_token.member_list_entries].s_addr; - memb_next.sin_family = AF_INET; - memb_next.sin_port = sockaddr_in_mcast.sin_port; - } -//ABRA - } break; case MEMB_STATE_EVS: