jiridanek commented on a change in pull request #309:
URL: https://github.com/apache/qpid-proton/pull/309#discussion_r613512616



##########
File path: cpp/src/sender.cpp
##########
@@ -64,10 +64,17 @@ namespace {
 uint64_t tag_counter = 0;
 }
 
-tracker sender::send(const message &message) {
+tracker sender::send(const message &message,const binary &tag) {
+    pn_delivery_t *dlv;
+    if(!tag.empty())
+    {
+    dlv = pn_delivery(pn_object(), pn_dtag((std::string(tag)).c_str(), 
tag.size()));

Review comment:
       This could be done in a nicer way. `binary` is a vector; you are 
guaranteed that the individual values will be in memory one after another, so 
even something like `(char *) &tag[0]` should work, no need to convert to 
string, then do c_str.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to