qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1414711 - /qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.cpp
Date Wed, 28 Nov 2012 14:13:53 GMT
Author: gsim
Date: Wed Nov 28 14:13:52 2012
New Revision: 1414711

URL: http://svn.apache.org/viewvc?rev=1414711&view=rev
Log:
QPID-4465: check subject before setting filter

Modified:
    qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.cpp

Modified: qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.cpp?rev=1414711&r1=1414710&r2=1414711&view=diff
==============================================================================
--- qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.cpp (original)
+++ qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.cpp Wed Nov 28 14:13:52
2012
@@ -120,18 +120,20 @@ void ReceiverContext::configure(pn_termi
         helper.setNodeProperties(source);
     }
 
-    //filter:
-    pn_data_t* filter = pn_terminus_filter(source);
-    pn_data_put_map(filter);
-    pn_data_enter(filter);
-    pn_data_put_symbol(filter, convert("subject"));
-    //TODO: At present inserting described values into the map doesn't seem to work; correct
this once resolved
-    //pn_data_put_described(filter);
-    //pn_data_enter(filter);
-    //pn_data_put_ulong(filter, getFilterDescriptor(address.getSubject()));
-    pn_data_put_string(filter, convert(address.getSubject()));
-    //pn_data_exit(filter);
-    pn_data_exit(filter);
+    if (!address.getSubject().empty()) {
+        //filter:
+        pn_data_t* filter = pn_terminus_filter(source);
+        pn_data_put_map(filter);
+        pn_data_enter(filter);
+        pn_data_put_symbol(filter, convert("subject"));
+        //TODO: At present inserting described values into the map doesn't seem to work;
correct this once resolved
+        //pn_data_put_described(filter);
+        //pn_data_enter(filter);
+        //pn_data_put_ulong(filter, getFilterDescriptor(address.getSubject()));
+        pn_data_put_string(filter, convert(address.getSubject()));
+        //pn_data_exit(filter);
+        pn_data_exit(filter);
+    }
 }
 
 bool ReceiverContext::isClosed() const



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


Mime
View raw message