From 44833bc5a2e2add610472a9cbb8b52ccf60bff2e Mon Sep 17 00:00:00 2001 From: bdemsky Date: Mon, 2 Apr 2007 17:02:15 +0000 Subject: [PATCH] check in dstmserver change --- .../src/Runtime/DSTM/interface/dstmserver.c | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Robust/src/Runtime/DSTM/interface/dstmserver.c b/Robust/src/Runtime/DSTM/interface/dstmserver.c index fdc23691..a76f3d47 100644 --- a/Robust/src/Runtime/DSTM/interface/dstmserver.c +++ b/Robust/src/Runtime/DSTM/interface/dstmserver.c @@ -97,17 +97,17 @@ void *dstmAccept(void *acceptfd) if (h == NULL) { ctrl = OBJECT_NOT_FOUND; } else { - ctrl = OBJECT_FOUND; - size = sizeof(objheader_t) + sizeof(classsize[h->type]); - if(send((int)acceptfd, &ctrl, sizeof(char), 0) < 0) { - perror("Error sending control msg to coordinator\n"); - } - if(send((int)acceptfd, &size, sizeof(int), 0) < 0) { - perror("Error sending size of object to coordinator\n"); - } - if(send((int)acceptfd, h, size, 0) < 0) { - perror("Error in sending object\n"); - } + char responsemessage[sizeof(char)+sizeof(int)]; + /* Type */ + responsemessage[0]=OBJECT_FOUND; + /* Size of object */ + *((int *)(&responsemessage[1])) = sizeof(objheader_t) + classsize[h->type]; + if(send((int)acceptfd, &responsemessage, sizeof(responsemessage), 0) < 0) { + perror("Error sending control msg to coordinator\n"); + } + if(send((int)acceptfd, h, size, 0) < 0) { + perror("Error in sending object\n"); + } } break; -- 2.34.1