Thank you for your reply, i tried your suggestion but still it gives me the same problem i faced earlier.
Anyways, I removed all the cofunctions because i would like to get a better understanding of sending and recieving msgs to ports.
However, I still have a problem! I created a buffer that i store in it my msgData and pass it to port C then B. I get an empty buffer in port B which am sure that i dont pass an empty array.
Am new to embedded systems development, and your help is highly appreciated.
Please, do have look to the code.
memcpy(buffer, msgData, msgData(string2));
memset(buffer, 0x00, sizeof(buffer));
n = serBread(buffer, sizeof(buffer),20);