!12 Fix incorrect number of arguments to mq_open()

Merge pull request !12 from Zbigniew/ostc-softbus-dev
This commit is contained in:
openharmony_ci
2021-01-07 16:15:57 +08:00
committed by Gitee
+3 -1
View File
@@ -79,7 +79,9 @@ int CreateMsgQue(const char *queueName,
newAttr.mq_flags = flags;
newAttr.mq_maxmsg = len;
newAttr.mq_msgsize = maxMsgSize;
int mqd = mq_open(queueName, O_RDWR | O_CREAT, &newAttr);
/* Owner read and write permission - 0600 */
mode_t mode = (S_IRUSR | S_IWUSR);
int mqd = mq_open(queueName, O_RDWR | O_CREAT, mode, &newAttr);
if (mqd < 0) {
return -1;
}