Skip to content

Commit a454cf4

Browse files
Otpvondoiatsxiaoxiang781216
authored andcommitted
system/uorb: uorb_listener flush functionality optimization.
uorb/listener:Added flush failure prompt information. Signed-off-by: likun17 <likun17@xiaomi.com>
1 parent ada12ce commit a454cf4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

system/uorb/listener.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,13 +559,13 @@ static void listener_flush_topic(FAR const struct listen_list_s *objlist,
559559
int ret;
560560

561561
fds = calloc(nb_objects, sizeof(struct pollfd));
562-
if (!fds)
562+
if (fds == NULL)
563563
{
564564
return;
565565
}
566566

567567
result = calloc(nb_objects, sizeof(int8_t));
568-
if (!result)
568+
if (result == NULL)
569569
{
570570
free(fds);
571571
return;
@@ -598,6 +598,8 @@ static void listener_flush_topic(FAR const struct listen_list_s *objlist,
598598
if (ret < 0)
599599
{
600600
result[i] = ret;
601+
uorbinfo_raw("topic [%s%d] call flush failed! return:%d\n",
602+
tmp->object.meta->o_name, tmp->object.instance, ret);
601603
}
602604
else
603605
{

0 commit comments

Comments
 (0)