Might have forgotten to pack the message. Adding an extra pack.
[charm.git] / src / ck-com / DirectMulticastStrategy.C
index 9f985b24ef702262d2a8f02d6f41985b1352bfad..efa8da97d85badae9d24f597f2811f07440343f2 100644 (file)
@@ -193,6 +193,7 @@ void DirectMulticastStrategy::remoteMulticast(envelope *env,
     //Collect Multicast Statistics
     RECORD_SENDM_STATS(getInstance(), env->getTotalsize(), pelist, npes);
     
+    CkPackMessage(&env);
     //Sending a remote multicast
     CmiSyncListSendAndFree(npes, pelist, env->getTotalsize(), (char*)env);
 }
@@ -278,13 +279,7 @@ void DirectMulticastStrategy::handleNewMulticastMessage(envelope *env) {
     
     sec_ht.put(key) = new_obj;
 
-    if(new_obj->npes > 0) {
-        CkPackMessage(&env);
-        CmiSyncListSendAndFree(new_obj->npes, new_obj->pelist, 
-                               env->getTotalsize(), (char*)env);  
-    }
-    else        
-        CmiFree(env);                
+    remoteMulticast(env, new_obj);
     
     if(new_obj->indices.size() > 0)
         ComlibArrayInfo::localMulticast(&(new_obj->indices), newenv);