Zcpy Bcast Send API: Fix condition for marking BCAST messages
[charm.git] / src / ck-core / ck.C
index 79999ae5c00ade9f09ea2de2214612dd07d2cc4b..6a1a6888a900f2394677d720894e96250e49732f 100644 (file)
@@ -1199,11 +1199,8 @@ void _processHandler(void *converseMsg,CkCoreState *ck)
   if(CMI_ZC_MSGTYPE(env) == CMK_ZC_P2P_SEND_MSG || CMI_ZC_MSGTYPE(env) == CMK_ZC_BCAST_SEND_MSG){
     envelope *prevEnv = env;
 
-    ncpyEmApiMode mode = ncpyEmApiMode::P2P; // Ncpy p2p API
-
-    if(env->getMsgtype() == ForBocMsg || env->getMsgtype() == ForNodeBocMsg) {
-      mode = ncpyEmApiMode::BCAST; // Ncpy Bcast API
-    }
+    // Determine mode depending on the message
+    ncpyEmApiMode mode = (CMI_ZC_MSGTYPE(env) == CMK_ZC_BCAST_SEND_MSG) ? ncpyEmApiMode::BCAST : ncpyEmApiMode::P2P;
 
     env = CkRdmaIssueRgets(env, mode, prevEnv);