| Summary: | [RFE] qmfv2 must provide mainloop integration | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Steven Dake <sdake> |
| Component: | qpid-qmf | Assignee: | Darryl L. Pierce <dpierce> |
| Status: | CLOSED ERRATA | QA Contact: | Petr Matousek <pematous> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.1 | CC: | iboverma, jneedle, jross, pematous, sgraf, syeghiay, tross |
| Target Milestone: | rc | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | qpid-qmf-0.12-5 | Doc Type: | Enhancement |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-12-06 16:51:16 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | |||
| Bug Blocks: | 704353, 743047 | ||
|
Description
Steven Dake
2011-04-25 19:50:37 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. *** Bug 699501 has been marked as a duplicate of this bug. *** Fixed upstream in revision 1170314. An example program is provided to illustrate the use of the new, optional, feature. Here is the Readers Digest version:
#include <qmf/posix/EventNotifier.h>
void MyAgent::mainloop()
{
qmf::posix::EventNotifier notifier(agentSession);
int qmf_fd(notifier.getHandle());
// qmf_fd is a file descriptor that shall be readable if and only if
// there is at least one qmf event to be processed. The application should
// neither read nor write data to or from this file descriptor. It should
// simply use it in select/poll to test its readability.
//
// If qmf_fd is readable, the application should call agentSession.nextEvent
// with a timeout of qpid::messaging::Duration::IMMEDIATE to assure that the
// call will never block.
while (running) {
...
retval = select(nfds, &rfds, NULL, NULL, &timeval);
if (retval > 0 && FD_ISSET(qmf_fd, &rfds)) {
AgentEvent event;
while (agentSession.nextEvent(event, Duration::IMMEDIATE)) {
// Process Event
}
}
...
}
}
Note that the above is also usable for Console sessions.
The issue has been fixed Verified on RHEL6.2-20111019.2, architectures: i386, x86_64 packages installed: python-qpid-0.12-1.el6.noarch python-qpid-qmf-0.12-6.el6.x86_64 qpid-cpp-client-0.12-6.el6.x86_64 qpid-cpp-client-devel-0.12-6.el6.x86_64 qpid-cpp-client-rdma-0.12-6.el6.x86_64 qpid-cpp-client-ssl-0.12-6.el6.x86_64 qpid-cpp-debuginfo-0.12-6.el6.x86_64 qpid-cpp-server-0.12-6.el6.x86_64 qpid-cpp-server-cluster-0.12-6.el6.x86_64 qpid-cpp-server-devel-0.12-6.el6.x86_64 qpid-cpp-server-rdma-0.12-6.el6.x86_64 qpid-cpp-server-ssl-0.12-6.el6.x86_64 qpid-cpp-server-store-0.12-6.el6.x86_64 qpid-cpp-server-xml-0.12-6.el6.x86_64 qpid-java-client-0.10-11.el6.noarch qpid-java-common-0.10-11.el6.noarch qpid-java-example-0.10-11.el6.noarch qpid-java-jca-0.10-11.el6.noarch qpid-java-jca-zip-0.10-11.el6.noarch qpid-qmf-0.12-6.el6.x86_64 qpid-qmf-debuginfo-0.12-6.el6.x86_64 qpid-qmf-devel-0.12-6.el6.x86_64 qpid-tests-0.12-1.el6.noarch qpid-tools-0.12-2.el6.noarch rh-qpid-cpp-tests-0.12-6.el6.x86_64 ruby-qpid-0.7.946106-2.el6.x86_64 ruby-qpid-qmf-0.12-6.el6.x86_64 -> VERIFIED *** Bug 751865 has been marked as a duplicate of this bug. *** Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1671.html |