-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement error reply support #523
Conversation
1de96ec
to
6dac662
Compare
@@ -65,7 +74,7 @@ int main(int argc, char **argv) { | |||
int n = 0; | |||
|
|||
int opt; | |||
while ((opt = getopt(argc, argv, "k:e:m:v:l:n:d")) != -1) { | |||
while ((opt = getopt(argc, argv, "k:e:m:v:l:n:df")) != -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
df
-> d:f
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, ":" means that option value expected
https://www.man7.org/linux/man-pages/man3/getopt.3.html
// FIXME: The support for reply errors will come in the next release. | ||
return true; | ||
} | ||
_Bool z_reply_is_ok(const z_loaned_reply_t *reply) { return reply->_tag != _Z_REPLY_TAG_ERROR; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this modification, this PR probably closes #345 as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems, yes
Implement error reply send and receive support
Add API methods:
Update z_get to receive error reply
Update z_queryable with the option to send error
Mark z_reply_tag_t as private
Closes:
#460
#463