소스 검색

qdevice: Fix connect heuristics result callback

Previous patch b676b060613edc640021fb1f1dfdfd9305059069 was wrong
because it fixed the crash but made qdevice not work at all.

Correct solution is to test, if state is
QDEVICE_NET_INSTANCE_STATE_WAITING_INIT_REPLY.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>

(cherry picked from corosync-qdevice project commit
 6bf5f6c011cca5ec25c23b0f2b4adfc605eaa65d)
Jan Friesse 5 년 전
부모
커밋
b2f6095f6d
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      qdevices/qdevice-net-heuristics.c

+ 3 - 1
qdevices/qdevice-net-heuristics.c

@@ -207,10 +207,12 @@ qdevice_net_connect_heuristics_exec_result_callback(void *heuristics_instance_pt
 		return (0);
 	}
 
-	if (net_instance->state != QDEVICE_NET_INSTANCE_STATE_WAITING_VOTEQUORUM_CMAP_EVENTS) {
+	if (net_instance->state != QDEVICE_NET_INSTANCE_STATE_WAITING_INIT_REPLY) {
 		/*
 		 * Not connected to qnetd -> heuristics will be called again on new connect
 		 */
+		log(LOG_DEBUG, "Received unexpected net connect heuristics in state %u",
+		    net_instance->state);
 		return (0);
 	}