Ipc::StrandCoord::StrandCoord(const TypedMsgHdr &hdrMsg): kidId(-1), pid(0)
{
- hdrMsg.getData(mtRegistration, this, sizeof(this));
+ hdrMsg.getData(mtRegistration, this, sizeof(*this));
}
void Ipc::StrandCoord::pack(TypedMsgHdr &hdrMsg) const
{
- hdrMsg.putData(mtRegistration, this, sizeof(this));
+ hdrMsg.putData(mtRegistration, this, sizeof(*this));
}
Ipc::Descriptor::Descriptor(const TypedMsgHdr &hdrMsg): fromKid(-1), fd(-1)
{
if (hdrMsg.type() == mtDescriptorGet) {
- hdrMsg.getData(mtDescriptorGet, this, sizeof(this));
+ hdrMsg.getData(mtDescriptorGet, this, sizeof(*this));
fd = -1;
} else {
- hdrMsg.getData(mtDescriptorPut, this, sizeof(this));
+ hdrMsg.getData(mtDescriptorPut, this, sizeof(*this));
fd = hdrMsg.getFd();
}
}
void Ipc::Descriptor::pack(TypedMsgHdr &hdrMsg) const
{
if (fd >= 0) {
- hdrMsg.putData(mtDescriptorPut, this, sizeof(this));
+ hdrMsg.putData(mtDescriptorPut, this, sizeof(*this));
hdrMsg.putFd(fd);
} else {
- hdrMsg.putData(mtDescriptorGet, this, sizeof(this));
+ hdrMsg.putData(mtDescriptorGet, this, sizeof(*this));
}
}