diff options
author | David Timber <mieabby@gmail.com> | 2020-10-20 07:28:50 +1030 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-10-20 07:28:50 +1030 |
commit | 4c882d7216bb12d5821a108b9f11544a075c7024 (patch) | |
tree | 84fba1d9decbab537a2ddb1931ef89f219438274 /src/protocol.c | |
parent | 5dbfcb1f66b681fbb6cdec8836efe2c2d84f957e (diff) |
Impl hostinfod and extras ...
* Use EOVERFLOW instead of E2BIG
* Add prne_iobuf_zero()
* Fix format check logic error in prne_htbt_ser_msg_head()
* Add prne_dup_str()
* Add prne_timespec_ms()
Diffstat (limited to 'src/protocol.c')
-rw-r--r-- | src/protocol.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/protocol.c b/src/protocol.c index dd61fd5..85a2142 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -519,7 +519,8 @@ prne_htbt_ser_rc_t prne_htbt_ser_msg_head ( } if (in->id & 0x8000 || PRNE_HTBT_OP_NONE == in->op || - (in->id == 0) ^ (in->op == PRNE_HTBT_OP_NOOP)) { + (in->op == PRNE_HTBT_OP_NOOP && in->id != 0) || + (in->id == 0 && in->op != PRNE_HTBT_OP_NOOP)) { return PRNE_HTBT_SER_RC_FMT_ERR; } |