From 2eadee71538ca4fc89d3bc80629408f833f4551c Mon Sep 17 00:00:00 2001 From: glenux Date: Mon, 23 Feb 2004 19:17:58 +0000 Subject: [PATCH] *** empty log message *** --- src/ids.c | 15 +++++++++++++++ src/ids.h | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) 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