minor fix

This commit is contained in:
Gabriel Wang 2023-02-12 19:33:56 +00:00
parent bc0e21afc3
commit f225d0e8e8
2 changed files with 7 additions and 15 deletions

View File

@ -1091,15 +1091,15 @@ static FilterReturn _do_message_filter( PikaObj* self,
if (0 == message_size) {
/* message match */
if (NULL != msg->handler) {
if (msg->handler(msg, self, shell)) {
/* message is handled */
if (msg->is_visible) {
return __FILTER_SUCCESS_GET_ALL_PEEKED;
}
return __FILTER_SUCCESS_DROP_ALL_PEEKED;
if (!msg->handler(msg, self, shell)) {
break;
}
}
/* message is handled */
if (msg->is_visible) {
return __FILTER_SUCCESS_GET_ALL_PEEKED;
}
return __FILTER_SUCCESS_DROP_ALL_PEEKED;
}
} while(0);

View File

@ -68,14 +68,6 @@ add_filter_msg(bye_pika, "bye pika", .is_case_insensitive = PIKA_TRUE)
* __NO_FILTER_HANLDER__,
* )
*/
add_filter_item(
example_array,
.message = (const uint8_t []){'a','b','c'},
.size = 3,
__NO_FILTER_HANLDER__,
)
#if defined(__clang__)
# pragma clang diagnostic pop