Module: xenomai-head
Branch: master
Commit: 983fe7f1b5b5617c8a0db9173f28d66fc6e7af8b
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=983fe7f1b5b5617c8a0db9173f28d66fc6e7af8b

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Sep  9 19:08:58 2009 +0200

rtipc/iddp: fix missing indirection

---

 ksrc/drivers/ipc/iddp.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/ksrc/drivers/ipc/iddp.c b/ksrc/drivers/ipc/iddp.c
index d247029..78b3e23 100644
--- a/ksrc/drivers/ipc/iddp.c
+++ b/ksrc/drivers/ipc/iddp.c
@@ -147,11 +147,11 @@ __iddp_alloc_mbuf(struct iddp_socket *sk, size_t len,
                         * by this construct.
                         */
                        ++sk->stalls;
-                       ++sk->poolwait;
+                       (*sk->poolwait)++;
                        ret = rtdm_event_timedwait(sk->poolevt,
                                                   timeout,
                                                   &timeout_seq);
-                       sk->poolwait--;
+                       (*sk->poolwait)--;
                        if (unlikely(ret == -EIDRM))
                                ret = -ECONNRESET;
                );
@@ -212,7 +212,6 @@ static int iddp_close(struct rtipc_private *priv,
 {
        struct iddp_socket *sk = priv->state;
        struct iddp_message *mbuf;
-       LIST_HEAD(head);
 
        if (sk->name.sipc_port > -1) {
                portmap[sk->name.sipc_port] = NULL;
@@ -231,11 +230,10 @@ static int iddp_close(struct rtipc_private *priv,
        }
 
        /* Send unread datagrams back to the system heap. */
-       list_splice(&sk->inq, &head);
-       while (!list_empty(&head)) {
-               mbuf = list_entry(head.next, struct iddp_message, next);
+       while (!list_empty(&sk->inq)) {
+               mbuf = list_entry(sk->inq.next, struct iddp_message, next);
                list_del(&mbuf->next);
-               __iddp_free_mbuf(sk, mbuf);
+               xnheap_free(&kheap, mbuf);
        }
 
        return 0;


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to