diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-06 15:43:28 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-06 15:43:28 +0000 |
commit | f7b7532a4114b831f5ef66ed992d28e65fb3973f (patch) | |
tree | 929ad375fc60be5b08f35b49ff681db96d97b842 /apps/examples/ostest/mqueue.c | |
parent | d8a1b61690862777b137ec182a0d62dcf4ee8db2 (diff) | |
download | px4-nuttx-f7b7532a4114b831f5ef66ed992d28e65fb3973f.tar.gz px4-nuttx-f7b7532a4114b831f5ef66ed992d28e65fb3973f.tar.bz2 px4-nuttx-f7b7532a4114b831f5ef66ed992d28e65fb3973f.zip |
Changed needed to fix issues with task_restart()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5615 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/ostest/mqueue.c')
-rw-r--r-- | apps/examples/ostest/mqueue.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/examples/ostest/mqueue.c b/apps/examples/ostest/mqueue.c index 0bb3473dc..b747af089 100644 --- a/apps/examples/ostest/mqueue.c +++ b/apps/examples/ostest/mqueue.c @@ -415,17 +415,17 @@ void mqueue_test(void) * message queue open. */ - if (result == PTHREAD_CANCELED && g_send_mqfd) + if (result == PTHREAD_CANCELED && g_recv_mqfd) { - if (mq_close(g_send_mqfd) < 0) + if (mq_close(g_recv_mqfd) < 0) { printf("mqueue_test: ERROR mq_close failed\n"); } } - else if (result != PTHREAD_CANCELED && g_send_mqfd) + else if (result != PTHREAD_CANCELED && g_recv_mqfd) { printf("mqueue_test: ERROR send mqd_t left open\n"); - if (mq_close(g_send_mqfd) < 0) + if (mq_close(g_recv_mqfd) < 0) { printf("mqueue_test: ERROR mq_close failed\n"); } @@ -433,10 +433,10 @@ void mqueue_test(void) /* Make sure that the receive queue is closed as well */ - if (g_recv_mqfd) + if (g_send_mqfd) { printf("mqueue_test: ERROR receive mqd_t left open\n"); - if (mq_close(g_recv_mqfd) < 0) + if (mq_close(g_send_mqfd) < 0) { printf("sender_thread: ERROR mq_close failed\n"); } |