system/uorb: fix err when using the -n 1 parameter
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
This commit is contained in:
parent
fd40e25e67
commit
93348ca1ca
@ -535,12 +535,7 @@ static void listener_monitor(FAR struct list_node *objlist, int nb_objects,
|
||||
fds[i].events = POLLIN;
|
||||
}
|
||||
|
||||
if (nb_msgs == 1)
|
||||
{
|
||||
listener_print(tmp->object.meta, fd);
|
||||
orb_unsubscribe(fd);
|
||||
}
|
||||
else if (interval != 0)
|
||||
if (interval != 0)
|
||||
{
|
||||
orb_set_interval(fd, (unsigned)interval);
|
||||
|
||||
@ -553,13 +548,6 @@ static void listener_monitor(FAR struct list_node *objlist, int nb_objects,
|
||||
i++;
|
||||
}
|
||||
|
||||
if (nb_msgs == 1)
|
||||
{
|
||||
free(fds);
|
||||
free(recv_msgs);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Loop poll and print recieved messages */
|
||||
|
||||
while ((!nb_msgs || nb_recv_msgs < nb_msgs) && !g_should_exit)
|
||||
|
Loading…
Reference in New Issue
Block a user