[jira] [Commented] (PROTON-1211) C++ binding exception in message::correlation_id()

2016-05-25 Thread ASF subversion and git services (JIRA)

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

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

Commit b937c85d213fe64a959e259c60ae700904371566 in qpid-proton's branch 
refs/heads/0.13.x from Clifford Jansen
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=b937c85 ]

PROTON-1211: C++ binding - incorrect replacing of message correlation_id


> C++ binding exception in message::correlation_id()
> --
>
> Key: PROTON-1211
> URL: https://issues.apache.org/jira/browse/PROTON-1211
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: cpp-binding
>Affects Versions: 0.13.0, 0.14.0
>Reporter: Cliff Jansen
>Assignee: Cliff Jansen
>Priority: Blocker
> Fix For: 0.13.0
>
> Attachments: msgid.cpp
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (PROTON-1211) C++ binding exception in message::correlation_id()

2016-05-25 Thread Justin Ross (JIRA)

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

Justin Ross commented on PROTON-1211:
-

Reviewed by Alan.  Approved for 0.13.0.

> C++ binding exception in message::correlation_id()
> --
>
> Key: PROTON-1211
> URL: https://issues.apache.org/jira/browse/PROTON-1211
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: cpp-binding
>Affects Versions: 0.13.0, 0.14.0
>Reporter: Cliff Jansen
>Assignee: Cliff Jansen
>Priority: Blocker
> Fix For: 0.13.0
>
> Attachments: msgid.cpp
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (PROTON-1211) C++ binding exception in message::correlation_id()

2016-05-25 Thread Alan Conway (JIRA)

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

Alan Conway commented on PROTON-1211:
-

This approach using value rather than encoder is equivalent to the previous 
patch and more consistent since we are trying to phase out use of enocder. Also 
less error-prone (as this bug shows )since it's impossible to forget the 
clear(), which is built into op=. Approved for 0.13

> C++ binding exception in message::correlation_id()
> --
>
> Key: PROTON-1211
> URL: https://issues.apache.org/jira/browse/PROTON-1211
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: cpp-binding
>Affects Versions: 0.13.0, 0.14.0
>Reporter: Cliff Jansen
>Assignee: Cliff Jansen
>Priority: Blocker
> Fix For: 0.13.0
>
> Attachments: msgid.cpp
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (PROTON-1211) C++ binding exception in message::correlation_id()

2016-05-24 Thread ASF subversion and git services (JIRA)

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

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

Commit ebc78988a0f28399cbbc91edb5c63a4218084571 in qpid-proton's branch 
refs/heads/master from Clifford Jansen
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=ebc7898 ]

PROTON-1211: C++ binding - incorrect replacing of message correlation_id


> C++ binding exception in message::correlation_id()
> --
>
> Key: PROTON-1211
> URL: https://issues.apache.org/jira/browse/PROTON-1211
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: cpp-binding
>Affects Versions: 0.13.0, 0.14.0
>Reporter: Cliff Jansen
>Assignee: Cliff Jansen
>Priority: Blocker
> Fix For: 0.13.0
>
> Attachments: msgid.cpp
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (PROTON-1211) C++ binding exception in message::correlation_id()

2016-05-24 Thread Alan Conway (JIRA)

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

Alan Conway commented on PROTON-1211:
-

e.clear() is correct, the previous code was a bug. 

make_wrapper doesn't make a new data object, it just makes a C++ pointer 
wrapper to the existing one, so repeatedly calling << will make it grow.

This is old code and could be made more intuitive by the value API, where 
assignment replaces the existing contents.

However the patch above with e.clear() is correct.

> C++ binding exception in message::correlation_id()
> --
>
> Key: PROTON-1211
> URL: https://issues.apache.org/jira/browse/PROTON-1211
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: cpp-binding
>Affects Versions: 0.13.0, 0.14.0
>Reporter: Cliff Jansen
>Assignee: Cliff Jansen
>Priority: Blocker
> Fix For: 0.13.0
>
> Attachments: msgid.cpp
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (PROTON-1211) C++ binding exception in message::correlation_id()

2016-05-24 Thread Cliff Jansen (JIRA)

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

Cliff Jansen commented on PROTON-1211:
--

Simplest fix is to just clear the pn_data_t before new insertion:

diff -c message.cpp.cj0 message.cpp

*** 143,148 
--- 143,149 
  
  void message::correlation_id(const message_id& id) {
  codec::encoder e(make_wrapper(pn_message_correlation_id(pn_msg(;
+ e.clear();
  e << id;
  }


But perhaps new encoders should clear by default as the more intuative use (and 
have a separate constructor for the "and save my current position" case).

> C++ binding exception in message::correlation_id()
> --
>
> Key: PROTON-1211
> URL: https://issues.apache.org/jira/browse/PROTON-1211
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: cpp-binding
>Affects Versions: 0.13.0, 0.14.0
>Reporter: Cliff Jansen
>Assignee: Cliff Jansen
>Priority: Blocker
> Fix For: 0.13.0
>
> Attachments: msgid.cpp
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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