]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sctp/ulpevent.c
checkpatch: usb_free_urb() can take NULL
[linux-2.6-omap-h63xx.git] / net / sctp / ulpevent.c
index b43f1f110f8738069c59f425bd9e40a8e81ecbee..a1f654aea2687ea740a48596a927486869bb7f65 100644 (file)
@@ -710,6 +710,11 @@ struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc,
        if (!skb)
                goto fail;
 
+       /* Now that all memory allocations for this chunk succeeded, we
+        * can mark it as received so the tsn_map is updated correctly.
+        */
+       sctp_tsnmap_mark(&asoc->peer.tsn_map, ntohl(chunk->subh.data_hdr->tsn));
+
        /* First calculate the padding, so we don't inadvertently
         * pass up the wrong length to the user.
         *
@@ -859,7 +864,7 @@ __u16 sctp_ulpevent_get_notification_type(const struct sctp_ulpevent *event)
        union sctp_notification *notification;
        struct sk_buff *skb;
 
-       skb = sctp_event2skb((struct sctp_ulpevent *)event);
+       skb = sctp_event2skb(event);
        notification = (union sctp_notification *) skb->data;
        return notification->sn_header.sn_type;
 }