diff --git a/src/allocate.c b/src/allocate.c index d4ee11e..4582721 100644 --- a/src/allocate.c +++ b/src/allocate.c @@ -32,6 +32,7 @@ void * msgAllocate(msgSpace *space, int bufferFreeIndex; int mSPoolFd; msgPoolData * mSPoolDataTabAddr; + int bufferNb; selectedPoolIndex=-1; @@ -199,7 +200,7 @@ void * msgAllocate(msgSpace *space, PROT_NONE, //prot PROT_READ | PROT_WRITE MAP_SHARED, mSPoolFd, (off_t)0); - int bufferNb=mSPoolDataTabAddr[selectedPoolIndex].bufferNb; + bufferNb=mSPoolDataTabAddr[selectedPoolIndex].bufferNb; // mprotect(resultAddr,bufferFreeSize*bufferNb,PROT_NONE); mprotect(resultAddr,bufferFreeSize*(bufferFreeIndex+1),PROT_READ|PROT_WRITE); diff --git a/src/queueInit.c b/src/queueInit.c index 4f0554b..a156388 100644 --- a/src/queueInit.c +++ b/src/queueInit.c @@ -28,8 +28,8 @@ msgQueue * queueInit(msgSpaceId externId, int queueIdx) { /* on remplit la structure msgQueue */ queue->elemCounter = 0; - queue->head = queue->id; - queue->tail = queue->id; + strcpy(queue->headId,queue->id); + strcpy(queue->tailId,queue->id); diff --git a/src/spaceCreate.c b/src/spaceCreate.c index 4564e78..fccc155 100644 --- a/src/spaceCreate.c +++ b/src/spaceCreate.c @@ -84,6 +84,7 @@ msgSpace * msgSpaceCreate( /* creation du poolData */ msgPoolDataIdIntern(poolDataTabId,externId); strcpy(mSAddr->poolDataTabId,poolDataTabId); + strcpy(mSAddr->externId,externId); mSDataTabSemFd=sem_open(mSAddr->poolDataTabSemId, O_CREAT|O_EXCL,SEM_DEFAULT_MODE,1);