Fix compatibility with PMIx v5.0.8 and v5.0.9

Starting in v5.0.8 cbfunc can be non-NULL and thus the return of
values of PMIX_OPERATION_SUCCEEDED and PMIX_SUCCESS are no longer treated
the same. So now in PMIx v5+ return PMIX_OPERATION_SUCCEEDED if cbfunc is
NULL otherwise call cbfunc and return PMIX_SUCCESS.

Changelog: Prevent PMIx 5.0.8 and 5.0.9 clients from hanging when
 connecting to the PMIx server.
Cherry-picked: fb12bc440b
diff --git a/src/plugins/mpi/pmix/pmixp_client_v2.c b/src/plugins/mpi/pmix/pmixp_client_v2.c
index 03af224..e9ad183 100644
--- a/src/plugins/mpi/pmix/pmixp_client_v2.c
+++ b/src/plugins/mpi/pmix/pmixp_client_v2.c
@@ -58,18 +58,18 @@
 			     pmix_op_cbfunc_t cbfunc, void *cbdata)
 {
 	/*
-	 * Before PMIx v6, a return of PMIX_SUCCESS was always excepted.
+	 * Before PMIx v5.0.8, a return of PMIX_SUCCESS was always excepted.
 	 * (Note: PMIx v3.1.0rc2+ would also treat PMIX_OPERATION_SUCCEEDED the
-	 *  same as PMIX_SUCCESS. Also cbfunc was always NULL before PMIx v6)
+	 *  same as PMIX_SUCCESS. Also cbfunc was always NULL before v5.0.8)
 	 *
-	 * Starting in PMIx v6, PMIX_SUCCESS and PMIX_OPERATION_SUCCEEDED are
-	 * treated differently. In v6+ only return PMIX_SUCCESS to indicate
-	 * cbfunc was called.
+	 * Starting in PMIx v5.0.8, PMIX_SUCCESS and PMIX_OPERATION_SUCCEEDED
+	 * are treated differently. In v5+ only return PMIX_SUCCESS to
+	 * indicate cbfunc was called.
 	 *
-	 * Also, guarding PMIX_OPERATION_SUCCEEDED in PMIx v6+ allows Slurm to
+	 * Also, guarding PMIX_OPERATION_SUCCEEDED in PMIx v5+ allows Slurm to
 	 * compile against PMIx v2 - v3.0.0 since it didn't exist yet.
 	 */
-#if (HAVE_PMIX_VER >= 6)
+#if (HAVE_PMIX_VER >= 5)
 	if (!cbfunc)
 		return PMIX_OPERATION_SUCCEEDED;