-
Notifications
You must be signed in to change notification settings - Fork 7
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
2016 04 stze result api call #57
Conversation
@mkind i'll hand over this PR and branch to you. If you'll find some problems, would be great if you could fix them, otherwise please merge into master. |
…fno-sanitize-recover=undefined,integer
…detailed error message
validation functions to validate sent requests and sent responses. In addition to that, the test message are all built by the same method. So no more redundant code in all dispatcher tests.
breaks the khashmap_get in connection_send_request.
…ver w/ -fno-sanitize-recover=undefined,integer" This reverts commit 456a6ad.
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.
Looks good to me @mkind. Only a few comments.
@@ -327,13 +329,13 @@ endif() | |||
|
|||
if(CLANG_ADDRESS_SANITIZER) | |||
set_property(TARGET sb APPEND_STRING PROPERTY COMPILE_FLAGS "-DEXITFREE ") | |||
set_property(TARGET sb APPEND_STRING PROPERTY COMPILE_FLAGS "-fno-sanitize-recover -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize=address -fsanitize=undefined ") | |||
set_property(TARGET sb APPEND_STRING PROPERTY COMPILE_FLAGS "-fno-sanitize-recover=undefined,integer -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize=address -fsanitize=undefined ") |
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.
this change seems reasonable, but it reverts an old commit where this option was disabled. travis clang is old and doesn't support undefined,integer
yet.
@@ -68,9 +68,12 @@ int api_result(char *targetpluginkey, uint64_t callid, | |||
cinfo = connection_send_request(targetpluginkey, result, result_params, | |||
api_error); | |||
|
|||
if (true == api_error->isset) |
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.
why not:
if(api_error->isset)
and
if(!api_error->isset)
instead of
if(true == api_error->isset)
and
if(false == api_error->isset)
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 problem with your proposal
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.
Fixed this in 0e6e4bb.
if (!p || !f) | ||
LOG_ERROR("[test] Failed to alloc mem for example plugin.\n"); | ||
|
||
p->key = cstring_copy_string("0123456789ABCDEF"); |
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.
would be nice to allocate all these strings on the stack. maybe we can change it to:
p->key = (string) {.str = "0123456789ABCDEF", .length = sizeof("0123456789ABCDEF") - 1}};
then we can remove the free_string
calls in the helper_free_plugin
function.
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.
This might be a general approach to save some heap allocs in other contexts too.
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.
fixed in a30446b
plugins without providing rpc calls itself. This is reasonable for different kinds of UI.
This PR introduces the result api call. You can test this by using
2016-05-bontric-implement-result-call
python client branch.