G'day, everyone!
My another issue is the following.
I have a server-client program that makes use of the message queues: clients communicate with each other centralizedly through the server; obviously, they use the same queue. Kind of a local instant messaging service with a basic set of functions. In the beginning the client registers and the server sends it a confirmation.
It works pretty well when I run it on my computer. But when I tried to execute it on the other system and send a message from the server, I immedeately got it crashed with the following error:
Code:
msgsnd : Invalid argument
This is what I got when I STFW'd
Two conditions can cause that error:
1. message queue identifier is not valid
2. message length is less than zero
But:
1. the client DOES register at server, therefore it uses msgsnd() successfully; the server uses the same queue; yet, the program crashes as soon as server attempts to use msgsnd(). I use my own header as an argument for ftok();
2. the content of message is just fine.
I don't get it. My question is, what could change when I switched from one system to the other?
Thanks in advance!