]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sctp/inqueue.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6-omap-h63xx.git] / net / sctp / inqueue.c
index 2d33922c044bb5108075de3fbff111a1207d66c7..cf6deed7e8497241cec4109c41c17130bc78906e 100644 (file)
@@ -73,8 +73,10 @@ void sctp_inq_free(struct sctp_inq *queue)
        /* If there is a packet which is currently being worked on,
         * free it as well.
         */
-       if (queue->in_progress)
+       if (queue->in_progress) {
                sctp_chunk_free(queue->in_progress);
+               queue->in_progress = NULL;
+       }
 
        if (queue->malloced) {
                /* Dump the master memory segment.  */
@@ -85,7 +87,7 @@ void sctp_inq_free(struct sctp_inq *queue)
 /* Put a new packet in an SCTP inqueue.
  * We assume that packet->sctp_hdr is set and in host byte order.
  */
-void sctp_inq_push(struct sctp_inq *q, struct sctp_chunk *packet)
+void sctp_inq_push(struct sctp_inq *q, struct sctp_chunk *chunk)
 {
        /* Directly call the packet handling routine. */
 
@@ -94,7 +96,7 @@ void sctp_inq_push(struct sctp_inq *q, struct sctp_chunk *packet)
         * Eventually, we should clean up inqueue to not rely
         * on the BH related data structures.
         */
-       list_add_tail(&packet->list, &q->in_chunk_list);
+       list_add_tail(&chunk->list, &q->in_chunk_list);
        q->immediate.func(q->immediate.data);
 }
 
@@ -147,6 +149,7 @@ struct sctp_chunk *sctp_inq_pop(struct sctp_inq *queue)
                /* This is the first chunk in the packet.  */
                chunk->singleton = 1;
                ch = (sctp_chunkhdr_t *) chunk->skb->data;
+               chunk->data_accepted = 0;
        }
 
         chunk->chunk_hdr = ch;