Get rid of the type field on zmessage
This commit is contained in:
parent
7bd6aa42b0
commit
685070d65e
13 changed files with 35 additions and 53 deletions
|
|
@ -35,8 +35,7 @@ z_err_t Channel::WriteStr(const char* msg) {
|
|||
if (!chan_cap_) {
|
||||
return Z_ERR_NULL;
|
||||
}
|
||||
uint64_t type = 0;
|
||||
return ZChannelSend(chan_cap_, type, strlen(msg),
|
||||
return ZChannelSend(chan_cap_, strlen(msg),
|
||||
reinterpret_cast<const uint8_t*>(msg), 0, 0);
|
||||
}
|
||||
|
||||
|
|
@ -44,10 +43,9 @@ z_err_t Channel::ReadStr(char* buffer, uint64_t* size) {
|
|||
if (!chan_cap_) {
|
||||
return Z_ERR_NULL;
|
||||
}
|
||||
uint64_t type;
|
||||
uint64_t num_caps;
|
||||
return ZChannelRecv(chan_cap_, *size, reinterpret_cast<uint8_t*>(buffer), 0,
|
||||
0, &type, size, &num_caps);
|
||||
0, size, &num_caps);
|
||||
}
|
||||
|
||||
z_err_t CreateChannels(Channel& c1, Channel& c2) {
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
Port::Port(uint64_t port_cap) : port_cap_(port_cap) {}
|
||||
|
||||
z_err_t Port::PollForIntCap(uint64_t *msg, uint64_t *cap) {
|
||||
uint64_t bytes, caps, type;
|
||||
uint64_t bytes, caps;
|
||||
RET_ERR(ZPortPoll(port_cap_, sizeof(uint64_t),
|
||||
reinterpret_cast<uint8_t *>(msg), /* num_caps= */ 1, cap,
|
||||
&type, &bytes, &caps));
|
||||
&bytes, &caps));
|
||||
|
||||
if (bytes != sizeof(uint64_t)) {
|
||||
return Z_ERR_INVALID;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue