We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ab3dd90 + 5e8067c commit 6f7f8dfCopy full SHA for 6f7f8df
src/core/fpipe.c
@@ -93,9 +93,19 @@ ipx_fpipe_create()
93
void
94
ipx_fpipe_destroy(ipx_fpipe_t *fpipe)
95
{
96
- if (fpipe->cnt != 0) {
+ // Destroy any leftover periodic messages
97
+ ipx_msg_t *msg;
98
+ int err_cnt = 0;
99
+ while ((msg = ipx_fpipe_read(fpipe)) != NULL) {
100
+ if (ipx_msg_get_type(msg) != IPX_MSG_PERIODIC) {
101
+ err_cnt++;
102
+ }
103
+ ipx_msg_destroy(msg);
104
105
+
106
+ if (err_cnt > 0) {
107
IPX_WARNING(fpipe_str, "Destroying of a pipe that still contains %" PRIu32 " unprocessed "
- "message(s)!", fpipe->cnt);
108
+ "non-periodic message(s)!", fpipe->cnt);
109
}
110
111
// Close the pipe and destroy the structure
0 commit comments