Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 659071

Summary: qpid::messaging::Connection:isOpen is non-const
Product: Red Hat Enterprise MRG Reporter: Chris Pitman <christopher.pitman>
Component: qpid-cppAssignee: Gordon Sim <gsim>
Status: CLOSED ERRATA QA Contact: Frantisek Reznicek <freznice>
Severity: low Docs Contact:
Priority: low    
Version: 1.3CC: esammons, freznice, jneedle, jross, tross
Target Milestone: 2.0   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: qpid-cpp-0.9.1079953 Doc Type: Bug Fix
Doc Text:
Cause: The qpid::messaging::Connection:isOpen() method is not marked as const. Consequence: That method can not be invoked on objects referenced via variable that is const. As the method is not attempting to alter the connections state, this is inconvenient. Fix: Add a const equivalent. Result: That method can now be invoked on objects referenced via variable that is const.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-23 15:49:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Pitman 2010-12-01 20:45:00 UTC
Description of problem:
qpid::messaging::Connection::isOpen is not const, which means the user can create recievers/senders but not check first if the connection is open.

qpid::client::Connection::isOpen is const.

Version-Release number of selected component (if applicable):
1.3

Comment 1 Gordon Sim 2011-01-17 10:28:17 UTC
Fixed upstream in r1059846.

Comment 3 Gordon Sim 2011-03-07 15:05:23 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:
The  qpid::messaging::Connection:isOpen() method is not marked as const.

Consequence:
That method can not be invoked on objects referenced via variable that is const. As the method is not attempting to alter the connections state, this is inconvenient.

Fix:
Add a const equivalent.

Result:
That method can now be invoked on objects referenced via variable that is const.

Comment 5 Frantisek Reznicek 2011-04-27 08:46:13 UTC
The new method isOpen() const; was added, tested on RHEL5.6 / 6.1snap i386/x86_64 on package:

[root@mrg-qe-xx ]# rpm -q qpid-cpp-client-devel
qpid-cpp-client-devel-0.10-4.el5.x86_64
[root@mrg-qe-xx ]# grep isOpen $(rpm -ql qpid-cpp-client-devel | grep qpid/messaging/Connection.h)
    QPID_MESSAGING_EXTERN bool isOpen();
    QPID_MESSAGING_EXTERN bool isOpen() const;

-> VERIFIED

Comment 6 errata-xmlrpc 2011-06-23 15:49:50 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0890.html