Sfoglia il codice sorgente

[totemknet] update for libknet.so.2.0.0 init API

more changes are to be expected on this front as the API evolves in
knet master.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Fabio M. Di Nitto 7 anni fa
parent
commit
ff7ace7655
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      exec/totemknet.c

+ 5 - 0
exec/totemknet.c

@@ -857,7 +857,12 @@ int totemknet_initialize (
 	fcntl(instance->logpipes[0], F_SETFL, O_NONBLOCK);
 	fcntl(instance->logpipes[1], F_SETFL, O_NONBLOCK);
 
+#if !defined(KNET_API_VER) || (KNET_API_VER == 1)
 	instance->knet_handle = knet_handle_new(instance->totem_config->node_id, instance->logpipes[1], KNET_LOG_DEBUG);
+#endif
+#if KNET_API_VER == 2
+	instance->knet_handle = knet_handle_new(instance->totem_config->node_id, instance->logpipes[1], KNET_LOG_DEBUG, KNET_HANDLE_FLAG_PRIVILEGED);
+#endif
 
 	if (!instance->knet_handle) {
 		KNET_LOGSYS_PERROR(errno, LOGSYS_LEVEL_CRIT, "knet_handle_new failed");