diff --git a/src/ids.c b/src/ids.c index 88247d6..403a13a 100644 --- a/src/ids.c +++ b/src/ids.c @@ -87,5 +87,20 @@ int msgBufferInfoTabIdIntern( return 0; } +int msgQueueSemIdIntern( + msgQueueSemId dest, + msgSpaceId externId, + int queueIdx){ + if (strlen(externId)>MSGSPACE_ID_LEN){ + return -1; + } +#ifdef _NZG_REALFILEID + sprintf(dest,"/tmp/nzgQueue-%s-%d",(char *)externId,queueIdx); +#else + sprintf(dest,"/nzgQueue-%s-%d",(char *)externId,queueIdx); +#endif + return 0; +} + #endif diff --git a/src/ids.h b/src/ids.h index 6dcd08c..d6c4e58 100644 --- a/src/ids.h +++ b/src/ids.h @@ -8,6 +8,9 @@ int msgSpaceIdIntern(msgSpaceId dest, const msgSpaceId src); int msgPoolSemIdIntern(msgPoolSemId destSemId, const msgSpaceId srcPoolId, int poolIdx); int msgPoolDataIdIntern(msgPoolDataTabId dest, const msgSpaceId src); int msgPoolIdIntern(msgPoolId dest,msgPoolId src, int num); - +int msgQueueSemIdIntern( + msgQueueSemId dest, + msgSpaceId externId, + int queueIdx); #endif