01-12-2009, 11:59 PM
|
#1
|
Member
Registered: Sep 2006
Distribution: Fedora Core 10
Posts: 254
Rep:
|
POSIX message queues problem..
Hi all,
I am having a weird problem with posix message queues,
i am not at all able to send more than 20 bytes to the message queue, mq_send is failing and telling message too long, but i have set mq_msgsize as 100 bytes and using this attributes in mq_open as
#define MAX_SIZE 100
mqd_t mqdes;
char buff[MAX_SIZE];
struct mq_attr attr;
attr.mq_msgsize = 100;
mqdes = mq_open("/mqueue", O_RDWR | O_CREAT, 644, &attr);
my mq_send is as below
mq_send(mqdes, buff, strlen(buff)+1, 1);
When i set MAX_SIZE as 20 it is sending.. but not more than that... !!!!
Can anyone help me solving this problem...
Thanks 
|
|
|