Bug 659071 - qpid::messaging::Connection:isOpen is non-const
Summary: qpid::messaging::Connection:isOpen is non-const
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 1.3
Hardware: All
OS: All
low
low
Target Milestone: 2.0
: ---
Assignee: Gordon Sim
QA Contact: Frantisek Reznicek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-01 20:45 UTC by Chris Pitman
Modified: 2015-11-16 01:13 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2011-06-23 15:49:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0890 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 2.0 Release 2011-06-23 15:42:41 UTC

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


Note You need to log in before you can comment on or make changes to this bug.