You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/02/17 19:03:42 UTC

[jira] [Commented] (PROTON-1407) pn_collector_next and pn_collector_peek are inconsistent

    [ https://issues.apache.org/jira/browse/PROTON-1407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15872308#comment-15872308 ] 

ASF subversion and git services commented on PROTON-1407:
---------------------------------------------------------

Commit 7368c34c1d141ba7754289161453d598860ea3da in qpid-proton's branch refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=7368c34 ]

PROTON-1407: pn_collector_next and pn_collector_peek are inconsistent

Make the behavior consistent as follows:
- peek returns the head of the collector
- pop() and next() remove the head of the collector, pop() discards it, next() returns it
- next() keeps the returned event alive until the following call to next()

next() no longer uses the head of the collector to keep returned events alive, the
returned event is remembered via a separate pointer.


> pn_collector_next and pn_collector_peek are inconsistent
> --------------------------------------------------------
>
>                 Key: PROTON-1407
>                 URL: https://issues.apache.org/jira/browse/PROTON-1407
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: 0.17.0
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>             Fix For: 0.18.0
>
>
> pn_collector_peek() == NULL is not a reliable test for an empty collector if you use pn_collector_next(). next() leaves the event on the head of the queue until the following call to next, which is confusing.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org