fixed long standing (9 years!) bug in CCS when running without charmrun (like in...
authorFilippo Gioachin <gioachin@illinois.edu>
Wed, 22 Jul 2009 00:26:15 +0000 (00:26 +0000)
committerFilippo Gioachin <gioachin@illinois.edu>
Wed, 22 Jul 2009 00:26:15 +0000 (00:26 +0000)
src/conv-ccs/conv-ccs.c

index e969c4b0168ff32cd0fc13e8f10b858d5ee95f55..92052356ab2ff739da9abdabae3a5a1b356c2b36 100644 (file)
@@ -272,7 +272,7 @@ void CcsImpl_reply(CcsImplHeader *rep,int repLen,const void *repData)
     int len=CmiMsgHeaderSizeBytes+
               sizeof(CcsImplHeader)+repLen;
     char *msg=CmiAlloc(len);
-    char *r=msg;
+    char *r=msg+CmiMsgHeaderSizeBytes;
     *(CcsImplHeader *)r=*rep; r+=sizeof(CcsImplHeader);
     memcpy(r,repData,repLen);
     CmiSetHandler(msg,rep_fw_handler_idx);
@@ -284,7 +284,7 @@ converse to node 0.*/
 static void rep_fw_handler(char *msg)
 {
   int len;
-  char *r=msg;
+  char *r=msg+CmiMsgHeaderSizeBytes;
   CcsImplHeader *hdr=(CcsImplHeader *)r; 
   r+=sizeof(CcsImplHeader);
   len=ChMessageInt(hdr->len);