Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:sschapiro:openstack:upstream
qpid-cpp
mrg_2.0.x.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mrg_2.0.x.patch of Package qpid-cpp
From ac35360c16ddfa2a283bf1e2de76b964092fe70f Mon Sep 17 00:00:00 2001 From: Alan Conway <aconway@apache.org> Date: Tue, 22 Mar 2011 18:26:14 +0000 Subject: [PATCH] Bug 689907 - Use static man page to avoid multilib rpm failure QPID-3160: Check in pre-generated man page Previously the man page was generated automatically from the output of qpidd --help. To make a distribution, you had to build the entire source tree just to generate the man page. This automation was of limited value as the core broker options do not change often. This commit includes a pre-generated man page. At each release we will manually re-generate and check in a new man page. Instructions are provided in docs/man/Makefile.am git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1084282 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/docs/man/Makefile.am | 21 +++- qpid/cpp/docs/man/qpidd.1 | 292 +++++++++++++++++++++++++++++++++++++++++ qpid/cpp/docs/man/qpidd.x | 2 + qpid/cpp/src/Makefile.am | 4 - 4 files changed, 313 insertions(+), 6 deletions(-) create mode 100644 qpid/cpp/docs/man/qpidd.1 diff --git a/qpid/cpp/docs/man/Makefile.am b/qpid/cpp/docs/man/Makefile.am index 14295f7..0da3e6d 100644 --- a/qpid/cpp/docs/man/Makefile.am +++ b/qpid/cpp/docs/man/Makefile.am @@ -16,10 +16,27 @@ # specific language governing permissions and limitations # under the License. # + +# Generate makefile from qpidd --help +# +# Note: qiddd.1 is normally a _checked in_ pre-generated file, so that +# make dist does not have to build the entire source just for the man page. +# +# To update the checked-in file (e.g. for a new release) do the following: +# +# - start with a completely clean checkout. +# - make sure there are no modules installed in your configured prefix, +# we don't want to pick up configuration from optional modules +# - do bootstrap; configure +# - in build-dir: cd src; make # build the broker +# - in source-dir: cd docs/man; rm qpidd.1 # remove checked-in man page. +# - in build-dir: cd docs/man; make # make new man page +# - if source-dir != build-dir: copy qpidd.1 from build-dir/docs/man to source-dir/docs/man + dist_man_MANS = qpidd.1 -man_aux = $(dist_man_MANS:.1=.x) -EXTRA_DIST = $(man_aux) generate_manpage groffify_options.sed groffify_template.sed +man_aux = $(dist_man_MANS:.1=.x) +EXTRA_DIST = $(man_aux) generate_manpage groffify_options.sed groffify_template.sed DISTCLEANFILES = $(dist_man_MANS) CLEANFILES=qpidd.1 diff --git a/qpid/cpp/docs/man/qpidd.1 b/qpid/cpp/docs/man/qpidd.1 new file mode 100644 index 0000000..56e3496 --- /dev/null +++ b/qpid/cpp/docs/man/qpidd.1 @@ -0,0 +1,292 @@ +.TH QPIDD "1" "March 2011" "qpidd (qpidc) version 0.11" "User Commands" +.SH NAME + +qpidd \- the Qpid AMQP Message Broker Daemon + +.SH SYNOPSIS + +qpidd [-p port] [--config config_file] [--data-dir directory] + +.SH DESCRIPTION + +An AMQP message broker daemon that stores, routes and forwards +messages using the Advanced Message Queueing Protocol (AMQP). + +.SH OPTIONS + +The options below are built-in to qpidd. Installing add-on modules provides additional options. To see the full set of options available type "qpidd --help" + +Options may be specified via command line, environment variable or configuration file. See FILES and ENVIRONMENT below for details. + +.PP + +.SS Options + +.TP +\-h [ \-\-help ] +Displays the +help message +.TP +\-v [ \-\-version ] +Displays version +information +.TP +\-\-config FILE (/home/remote/aconway/install/etc/qpidd.conf) +Reads configurat +ion from FILE + +.SS Module options +.TP +\-\-module\-dir DIR (/home/remote/aconway/install/lib/qpid/daemon) +Load all +shareable +modules in +this directo +ry +.TP +\-\-load\-module FILE +Specifies +additional +module(s) to +be loaded +.TP +\-\-no\-module\-dir +Don't load +modules from +module +directory + +.SS Broker Options +.TP +\-\-data\-dir DIR (/home/remote/aconway/.qpidd) +Directory to contain +persistent data generated +by the broker +.TP +\-\-no\-data\-dir +Don't use a data +directory. No persistent +configuration will be +loaded or stored +.TP +\-p [ \-\-port ] PORT (5672) +Tells the broker to +listen on PORT +.TP +\-\-worker\-threads N (9) +Sets the broker thread +pool size +.TP +\-\-max\-connections N (500) +Sets the maximum allowed +connections +.TP +\-\-connection\-backlog N (10) +Sets the connection +backlog limit for the +server socket +.TP +\-m [ \-\-mgmt\-enable ] yes|no (1) +Enable Management +.TP +\-\-mgmt\-qmf2 yes|no (1) +Enable broadcast of +management information +over QMF v2 +.TP +\-\-mgmt\-qmf1 yes|no (1) +Enable broadcast of +management information +over QMF v1 +.TP +\-\-mgmt\-pub\-interval SECONDS (10) +Management Publish +Interval +.TP +\-\-queue\-purge\-interval SECONDS (600) +Interval between attempts +to purge any expired +messages from queues +.TP +\-\-auth yes|no (1) +Enable authentication, if +disabled all incoming +connections will be +trusted +.TP +\-\-realm REALM (QPID) +Use the given realm when +performing authentication +.TP +\-\-default\-queue\-limit BYTES (104857600) +Default maximum size for +queues (in bytes) +.TP +\-\-tcp\-nodelay +Set TCP_NODELAY on TCP +connections +.TP +\-\-require\-encryption +Only accept connections +that are encrypted +\-\-known\-hosts\-url URL or \&'none' URL to send as +\&'known\-hosts' to clients +(\&'none' implies empty +list) +.TP +\-\-sasl\-config DIR +gets sasl config info +from nonstandard location +.TP +\-\-max\-session\-rate MESSAGES/S (0) +Sets the maximum message +rate per session +(0=unlimited) +.TP +\-\-async\-queue\-events yes|no (0) +Set Queue Events async, +used for services like +replication +.TP +\-\-default\-flow\-stop\-threshold %MESSAGES (80) +Queue capacity level at +which flow control is +activated. +.TP +\-\-default\-flow\-resume\-threshold %MESSAGES (70) +Queue capacity level at +which flow control is +de\-activated. +.TP +\-\-default\-event\-threshold\-ratio %age of limit (80) +The ratio of any +specified queue limit at +which an event will be +raised + +.SS Logging options +.TP +\-t [ \-\-trace ] +Enables all logging +.TP +\-\-log\-enable RULE (notice+) +Enables logging for selected levels +and components. RULE is in the form +\&'LEVEL[+][:PATTERN]' Levels are one +of: +trace debug info notice warning +error critical +For example: +\&'\-\-log\-enable warning+' logs all +warning, error and critical messages. +\&'\-\-log\-enable debug:framing' logs +debug messages from the framing +namespace. This option can be used +multiple times +.TP +\-\-log\-time yes|no (1) +Include time in log messages +.TP +\-\-log\-level yes|no (1) +Include severity level in log +messages +.TP +\-\-log\-source yes|no (0) +Include source file:line in log +messages +.TP +\-\-log\-thread yes|no (0) +Include thread ID in log messages +.TP +\-\-log\-function yes|no (0) +Include function signature in log +messages +.TP +\-\-log\-prefix STRING +Prefix to append to all log messages + +.SS Logging sink options +.TP +\-\-log\-to\-stderr yes|no (1) +Send logging output to stderr +.TP +\-\-log\-to\-stdout yes|no (0) +Send logging output to stdout +.TP +\-\-log\-to\-file FILE +Send log output to FILE. +.TP +\-\-log\-to\-syslog yes|no (0) +Send logging output to syslog; +customize using \-\-syslog\-name and +\-\-syslog\-facility +.TP +\-\-syslog\-name NAME (lt\-qpidd) +Name to use in syslog messages +.TP +\-\-syslog\-facility LOG_XXX (LOG_DAEMON) +Facility to use in syslog messages + +.SS Daemon options +.TP +\-d [ \-\-daemon ] +Run as a daemon. Logs to syslog +by default in this mode. +.TP +\-\-transport TRANSPORT (tcp) +The transport for which to +return the port +.TP +\-\-pid\-dir DIR (/home/remote/aconway/.qpidd) +Directory where port\-specific +PID file is stored +.TP +\-w [ \-\-wait ] SECONDS (600) +Sets the maximum wait time to +initialize the daemon. If the +daemon fails to initialize, +prints an error and returns 1 +.TP +\-c [ \-\-check ] +Prints the daemon's process ID +to stdout and returns 0 if the +daemon is running, otherwise +returns 1 +.TP +\-q [ \-\-quit ] +Tells the daemon to shut down + +.SH FILES +.I /etc/qpidd.conf +.RS +Default configuration file. +.RE + +Configuration file settings are over-ridden by command line or environment variable settings. '--config <file>' or 'export QPID_CONFIG=<file>' specifies an alternate file. + +Each line is a name=value pair. Blank lines and lines beginning with # are ignored. For example: + + # My qpidd configuration file. + port=6000 + max-connections=10 + log-to-file=/tmp/qpidd.log + +.SH ENVIRONMENT +.I QPID_<option> +.RS +There is an environment variable for each option. +.RE + +The environment variable is the option name in uppercase, prefixed with QPID_ and '.' or '-' are replaced with '_'. Environment settings are over-ridden by command line settings. For example: + + export QPID_PORT=6000 + export QPID_MAX_CONNECTIONS=10 + export QPID_LOG_TO_FILE=/tmp/qpidd.log + +.SH AUTHOR + +The Apache Qpid Project, dev@qpid.apache.org + +.SH REPORTING BUGS + +Please report bugs to users@qpid.apache.org diff --git a/qpid/cpp/docs/man/qpidd.x b/qpid/cpp/docs/man/qpidd.x index af5d962..0ccf3b5 100644 --- a/qpid/cpp/docs/man/qpidd.x +++ b/qpid/cpp/docs/man/qpidd.x @@ -13,6 +13,8 @@ messages using the Advanced Message Queueing Protocol (AMQP). [OPTIONS] +The options below are built-in to qpidd. Installing add-on modules provides additional options. To see the full set of options available type "qpidd --help" + Options may be specified via command line, environment variable or configuration file. See FILES and ENVIRONMENT below for details. [FILES] diff --git a/qpid/cpp/src/Makefile.am b/qpid/cpp/src/Makefile.am index dfb2547..aedcb03 100644 --- a/qpid/cpp/src/Makefile.am +++ b/qpid/cpp/src/Makefile.am @@ -884,10 +884,6 @@ nobase_include_HEADERS += \ ../include/qpid/types/Variant.h \ ../include/qpid/types/ImportExport.h -# Force build of qpidd during dist phase so help2man will work. -dist-hook: $(BUILT_SOURCES) - $(MAKE) qpidd - # Create the default data directory install-data-local: $(mkinstalldirs) $(DESTDIR)/$(localstatedir)/lib/qpidd -- 1.5.5.6 From e0f29ea4e352bb5b03f6eb3dc6ab0bd722380db9 Mon Sep 17 00:00:00 2001 From: Alan Conway <aconway@apache.org> Date: Tue, 22 Mar 2011 20:13:47 +0000 Subject: [PATCH] Bug 689907 - Remove file/directory defaults from pre-generated man page. QPID-3160: Remove file/directory defaults from pre-generated man page. These paths will be different depending on build configuration so they can't be included in a static man page. They will still be shown by qpidd --help. Also updated the instructions in Makefile.am to include this edit step. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1084339 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit 2703a3b9036eb48b54a5e324043b91c96fd21c21) --- qpid/cpp/docs/man/Makefile.am | 2 + qpid/cpp/docs/man/qpidd.1 | 138 ++++++++++++++++++++-------------------- 2 files changed, 71 insertions(+), 69 deletions(-) diff --git a/qpid/cpp/docs/man/Makefile.am b/qpid/cpp/docs/man/Makefile.am index 0da3e6d..b821568 100644 --- a/qpid/cpp/docs/man/Makefile.am +++ b/qpid/cpp/docs/man/Makefile.am @@ -31,6 +31,8 @@ # - in build-dir: cd src; make # build the broker # - in source-dir: cd docs/man; rm qpidd.1 # remove checked-in man page. # - in build-dir: cd docs/man; make # make new man page +# - edit qpidd.1 to remove all default values referring to file/directory locations. +# these values will differ between builds depending on configuration. # - if source-dir != build-dir: copy qpidd.1 from build-dir/docs/man to source-dir/docs/man dist_man_MANS = qpidd.1 diff --git a/qpid/cpp/docs/man/qpidd.1 b/qpid/cpp/docs/man/qpidd.1 index 56e3496..48b73b3 100644 --- a/qpid/cpp/docs/man/qpidd.1 +++ b/qpid/cpp/docs/man/qpidd.1 @@ -24,144 +24,144 @@ Options may be specified via command line, environment variable or configuration .TP \-h [ \-\-help ] -Displays the +Displays the help message .TP \-v [ \-\-version ] Displays version information .TP -\-\-config FILE (/home/remote/aconway/install/etc/qpidd.conf) +\-\-config FILE Reads configurat ion from FILE .SS Module options .TP -\-\-module\-dir DIR (/home/remote/aconway/install/lib/qpid/daemon) -Load all -shareable -modules in +\-\-module\-dir DIR +Load all +shareable +modules in this directo ry .TP \-\-load\-module FILE -Specifies -additional +Specifies +additional module(s) to be loaded .TP \-\-no\-module\-dir -Don't load +Don't load modules from -module +module directory .SS Broker Options .TP -\-\-data\-dir DIR (/home/remote/aconway/.qpidd) -Directory to contain +\-\-data\-dir DIR +Directory to contain persistent data generated by the broker .TP \-\-no\-data\-dir -Don't use a data +Don't use a data directory. No persistent -configuration will be +configuration will be loaded or stored .TP \-p [ \-\-port ] PORT (5672) -Tells the broker to +Tells the broker to listen on PORT .TP \-\-worker\-threads N (9) -Sets the broker thread +Sets the broker thread pool size .TP \-\-max\-connections N (500) -Sets the maximum allowed +Sets the maximum allowed connections .TP \-\-connection\-backlog N (10) -Sets the connection -backlog limit for the +Sets the connection +backlog limit for the server socket .TP \-m [ \-\-mgmt\-enable ] yes|no (1) Enable Management .TP \-\-mgmt\-qmf2 yes|no (1) -Enable broadcast of -management information +Enable broadcast of +management information over QMF v2 .TP \-\-mgmt\-qmf1 yes|no (1) -Enable broadcast of -management information +Enable broadcast of +management information over QMF v1 .TP \-\-mgmt\-pub\-interval SECONDS (10) -Management Publish +Management Publish Interval .TP \-\-queue\-purge\-interval SECONDS (600) Interval between attempts -to purge any expired +to purge any expired messages from queues .TP \-\-auth yes|no (1) Enable authentication, if -disabled all incoming -connections will be +disabled all incoming +connections will be trusted .TP \-\-realm REALM (QPID) -Use the given realm when +Use the given realm when performing authentication .TP \-\-default\-queue\-limit BYTES (104857600) -Default maximum size for +Default maximum size for queues (in bytes) .TP \-\-tcp\-nodelay -Set TCP_NODELAY on TCP +Set TCP_NODELAY on TCP connections .TP \-\-require\-encryption -Only accept connections +Only accept connections that are encrypted -\-\-known\-hosts\-url URL or \&'none' URL to send as -\&'known\-hosts' to clients -(\&'none' implies empty +\-\-known\-hosts\-url URL or \&'none' URL to send as +\&'known\-hosts' to clients +(\&'none' implies empty list) .TP \-\-sasl\-config DIR -gets sasl config info +gets sasl config info from nonstandard location .TP \-\-max\-session\-rate MESSAGES/S (0) -Sets the maximum message -rate per session +Sets the maximum message +rate per session (0=unlimited) .TP \-\-async\-queue\-events yes|no (0) -Set Queue Events async, -used for services like +Set Queue Events async, +used for services like replication .TP \-\-default\-flow\-stop\-threshold %MESSAGES (80) -Queue capacity level at -which flow control is +Queue capacity level at +which flow control is activated. .TP \-\-default\-flow\-resume\-threshold %MESSAGES (70) -Queue capacity level at -which flow control is +Queue capacity level at +which flow control is de\-activated. .TP \-\-default\-event\-threshold\-ratio %age of limit (80) -The ratio of any -specified queue limit at -which an event will be +The ratio of any +specified queue limit at +which an event will be raised .SS Logging options @@ -170,36 +170,36 @@ raised Enables all logging .TP \-\-log\-enable RULE (notice+) -Enables logging for selected levels -and components. RULE is in the form -\&'LEVEL[+][:PATTERN]' Levels are one -of: -trace debug info notice warning +Enables logging for selected levels +and components. RULE is in the form +\&'LEVEL[+][:PATTERN]' Levels are one +of: +trace debug info notice warning error critical For example: -\&'\-\-log\-enable warning+' logs all +\&'\-\-log\-enable warning+' logs all warning, error and critical messages. -\&'\-\-log\-enable debug:framing' logs -debug messages from the framing -namespace. This option can be used +\&'\-\-log\-enable debug:framing' logs +debug messages from the framing +namespace. This option can be used multiple times .TP \-\-log\-time yes|no (1) Include time in log messages .TP \-\-log\-level yes|no (1) -Include severity level in log +Include severity level in log messages .TP \-\-log\-source yes|no (0) -Include source file:line in log +Include source file:line in log messages .TP \-\-log\-thread yes|no (0) Include thread ID in log messages .TP \-\-log\-function yes|no (0) -Include function signature in log +Include function signature in log messages .TP \-\-log\-prefix STRING @@ -218,7 +218,7 @@ Send log output to FILE. .TP \-\-log\-to\-syslog yes|no (0) Send logging output to syslog; -customize using \-\-syslog\-name and +customize using \-\-syslog\-name and \-\-syslog\-facility .TP \-\-syslog\-name NAME (lt\-qpidd) @@ -230,27 +230,27 @@ Facility to use in syslog messages .SS Daemon options .TP \-d [ \-\-daemon ] -Run as a daemon. Logs to syslog +Run as a daemon. Logs to syslog by default in this mode. .TP \-\-transport TRANSPORT (tcp) -The transport for which to +The transport for which to return the port .TP -\-\-pid\-dir DIR (/home/remote/aconway/.qpidd) -Directory where port\-specific +\-\-pid\-dir DIR +Directory where port\-specific PID file is stored .TP \-w [ \-\-wait ] SECONDS (600) -Sets the maximum wait time to -initialize the daemon. If the -daemon fails to initialize, +Sets the maximum wait time to +initialize the daemon. If the +daemon fails to initialize, prints an error and returns 1 .TP \-c [ \-\-check ] -Prints the daemon's process ID -to stdout and returns 0 if the -daemon is running, otherwise +Prints the daemon's process ID +to stdout and returns 0 if the +daemon is running, otherwise returns 1 .TP \-q [ \-\-quit ] -- 1.5.5.6 From df009b1b5824009b4a1447ce80dba6c2cd30f98d Mon Sep 17 00:00:00 2001 From: Alan Conway <aconway@apache.org> Date: Mon, 21 Mar 2011 18:13:28 +0000 Subject: [PATCH] Bug 690205 - QPID-3116: rubygen with ruby 1.9 Fix name mangling for reserved "type" symbol to work on ruby 1.8 and 1.9. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.10@1083889 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit b90e6509861bce61699a5ad35b922c6b5f826e4b) --- qpid/cpp/rubygen/amqpgen.rb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qpid/cpp/rubygen/amqpgen.rb b/qpid/cpp/rubygen/amqpgen.rb index 69e65a4..20aac35 100755 --- a/qpid/cpp/rubygen/amqpgen.rb +++ b/qpid/cpp/rubygen/amqpgen.rb @@ -61,7 +61,8 @@ end class Module # Add trailing _ to avoid conflict with Object methods. def mangle(sym) - (Object.method_defined? sym) ? (sym.to_s+"_").intern : sym + sym = (sym.to_s+"_").to_sym if (Object.method_defined?(sym) or sym == :type) + sym end # Add attribute reader for XML attribute. -- 1.5.5.6 From 1ff6a40a6a512f86da12185e83ef78de84308597 Mon Sep 17 00:00:00 2001 From: Alan Conway <aconway@apache.org> Date: Mon, 21 Mar 2011 18:51:08 +0000 Subject: [PATCH] Bug 690202 - QPID-3147: Misconfigured tracing/logging can lead to hung threads in logging stack The hang was caused by re-entrant attempts to initialize the Logger singleton when an exception was thrown during logger configuration. The fix is to disable exception logging temporarily while the logger is constructed. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.10@1083897 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit 6ea9b14af77208cd3ddbde20365bb2aac3df3fe4) --- qpid/cpp/src/qpid/DisableExceptionLogging.h | 39 +++++++++++++++++++++++++++ qpid/cpp/src/qpid/Exception.cpp | 16 +++++++++- qpid/cpp/src/qpid/log/Logger.cpp | 12 ++++++-- 3 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 qpid/cpp/src/qpid/DisableExceptionLogging.h diff --git a/qpid/cpp/src/qpid/DisableExceptionLogging.h b/qpid/cpp/src/qpid/DisableExceptionLogging.h new file mode 100644 index 0000000..04a9240 --- /dev/null +++ b/qpid/cpp/src/qpid/DisableExceptionLogging.h @@ -0,0 +1,39 @@ +#ifndef QPID_DISABLEEXCEPTIONLOGGING_H +#define QPID_DISABLEEXCEPTIONLOGGING_H + +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +#include "qpid/CommonImportExport.h" + +namespace qpid { + +/** + * Temporarily disable logging in qpid::Exception constructor. + * Used by log::Logger to avoid logging exceptions during Logger construction. + */ +struct DisableExceptionLogging +{ + QPID_COMMON_EXTERN DisableExceptionLogging(); + QPID_COMMON_EXTERN ~DisableExceptionLogging(); +}; +} // namespace qpid + +#endif /*!QPID_DISABLEEXCEPTIONLOGGING_H*/ diff --git a/qpid/cpp/src/qpid/Exception.cpp b/qpid/cpp/src/qpid/Exception.cpp index 16a3a13..a6696f0 100644 --- a/qpid/cpp/src/qpid/Exception.cpp +++ b/qpid/cpp/src/qpid/Exception.cpp @@ -7,9 +7,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -21,13 +21,25 @@ #include "qpid/log/Statement.h" #include "qpid/Exception.h" +#include "qpid/DisableExceptionLogging.h" #include <typeinfo> #include <assert.h> #include <string.h> namespace qpid { +// Note on static initialization order: if an exception is constructed +// in a static constructor before disableExceptionLogging has been +// initialized, the worst that can happen is we lose an exception log +// message. Since we shouldn't be throwing a lot of exceptions during +// static construction this seems safe. +static bool disableExceptionLogging = false; + +DisableExceptionLogging::DisableExceptionLogging() { disableExceptionLogging = true; } +DisableExceptionLogging::~DisableExceptionLogging() { disableExceptionLogging = false; } + Exception::Exception(const std::string& msg) throw() : message(msg) { + if (disableExceptionLogging) return; QPID_LOG_IF(debug, !msg.empty(), "Exception constructed: " << message); } diff --git a/qpid/cpp/src/qpid/log/Logger.cpp b/qpid/cpp/src/qpid/log/Logger.cpp index 2217cdd..2339a62 100644 --- a/qpid/cpp/src/qpid/log/Logger.cpp +++ b/qpid/cpp/src/qpid/log/Logger.cpp @@ -22,6 +22,7 @@ #include "qpid/memory.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Time.h" +#include "qpid/DisableExceptionLogging.h" #include <boost/pool/detail/singleton.hpp> #include <boost/bind.hpp> #include <boost/function.hpp> @@ -48,11 +49,16 @@ Logger& Logger::instance() { } Logger::Logger() : flags(0) { + // Disable automatic logging in Exception constructors to avoid + // re-entrant use of logger singleton if there is an error in + // option parsing. + DisableExceptionLogging del; + // Initialize myself from env variables so all programs // (e.g. tests) can use logging even if they don't parse // command line args. Options opts(""); - opts.parse(0, 0); + opts.parse(0, 0); configure(opts); } @@ -73,7 +79,7 @@ void Logger::log(const Statement& s, const std::string& msg) { std::ostringstream os; if (!prefix.empty()) os << prefix << ": "; - if (flags&TIME) + if (flags&TIME) qpid::sys::outputFormattedNow(os); if (flags&LEVEL) os << LevelTraits::name(s.level) << " "; @@ -140,7 +146,7 @@ void Logger::configure(const Options& opts) { Options o(opts); if (o.trace) o.selectors.push_back("trace+"); - format(o); + format(o); select(Selector(o)); setPrefix(opts.prefix); options.sinkOptions->setup(this); -- 1.5.5.6 From 124ec0848f1654a2d8f1544deb609445ae032271 Mon Sep 17 00:00:00 2001 From: Alan Conway <aconway@apache.org> Date: Tue, 22 Mar 2011 13:34:40 +0000 Subject: [PATCH] Bug 690202 - QPID-3147: Misconfigured tracing/logging can lead to hung threads in logging stack Added missing qpid/DisableExceptionLogging.h to source list in Makefile.am. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.10@1084172 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit b1e1a8d107478d2a74facb3ed64ee8b3cfbf573c) --- qpid/cpp/src/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qpid/cpp/src/Makefile.am b/qpid/cpp/src/Makefile.am index aedcb03..01b7640 100644 --- a/qpid/cpp/src/Makefile.am +++ b/qpid/cpp/src/Makefile.am @@ -332,6 +332,7 @@ libqpidcommon_la_SOURCES += \ qpid/Address.cpp \ qpid/DataDir.cpp \ qpid/DataDir.h \ + qpid/DisableExceptionLogging.h \ qpid/Exception.cpp \ qpid/Modules.cpp \ qpid/Modules.h \ -- 1.5.5.6 From b946af81cd2d3c03548e0a7281f74eb250b55813 Mon Sep 17 00:00:00 2001 From: Jonathan Robie <jonathan.robie@redhat.com> Date: Wed, 23 Mar 2011 11:46:55 -0400 Subject: [PATCH] Adds deprecated fromString(). Resolves Bug 690167. --- qpid/cpp/include/qpid/types/Variant.h | 4 ++++ qpid/cpp/src/qpid/types/Variant.cpp | 4 ++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/qpid/cpp/include/qpid/types/Variant.h b/qpid/cpp/include/qpid/types/Variant.h index d926013..876e1a2 100644 --- a/qpid/cpp/include/qpid/types/Variant.h +++ b/qpid/cpp/include/qpid/types/Variant.h @@ -120,6 +120,10 @@ class Variant * value. Recognises integers, doubles and booleans. */ QPID_TYPES_EXTERN Variant& parse(const std::string&); + /** + * fromString() is deprecated - use parse() instead. + */ + QPID_TYPES_EXTERN Variant& fromString(const std::string& s); QPID_TYPES_EXTERN bool asBool() const; QPID_TYPES_EXTERN uint8_t asUint8() const; diff --git a/qpid/cpp/src/qpid/types/Variant.cpp b/qpid/cpp/src/qpid/types/Variant.cpp index 9cc3cfe..30d7ff1 100644 --- a/qpid/cpp/src/qpid/types/Variant.cpp +++ b/qpid/cpp/src/qpid/types/Variant.cpp @@ -781,6 +781,10 @@ Variant& Variant::parse(const std::string& s) return *this; } +Variant& Variant::fromString(const std::string& s) +{ + return parse(s); +} VariantType Variant::getType() const { return impl ? impl->getType() : VAR_VOID; } bool Variant::isVoid() const { return getType() == VAR_VOID; } -- 1.5.5.6 From caac9f3a9677f64647259c92a3fdf1563defee8d Mon Sep 17 00:00:00 2001 From: Ted Ross <tross@apache.org> Date: Tue, 22 Mar 2011 21:39:31 +0000 Subject: [PATCH] QPID-3159 - Applied patch from Angus Salkeld git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1084359 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/managementgen/qmfgen/schema.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qpid/cpp/managementgen/qmfgen/schema.py b/qpid/cpp/managementgen/qmfgen/schema.py index afdfe42..59e951f 100755 --- a/qpid/cpp/managementgen/qmfgen/schema.py +++ b/qpid/cpp/managementgen/qmfgen/schema.py @@ -1731,9 +1731,9 @@ class SchemaPackage: stream.write(" qmf::SchemaProperty arg(\"%s\", %s);\n" % (arg.name, typeName)) if subType: stream.write(" arg.setSubtype(\"%s\");\n" % subType) - if stat.unit: + if arg.unit: stream.write(" arg.setUnit(\"%s\");\n" % arg.unit) - if stat.desc: + if arg.desc: stream.write(" arg.setDesc(\"%s\");\n" % arg.desc) stream.write(" arg.setDirection(%s);\n" % self.qmfv2Dir(arg.dir)) stream.write(" method.addArgument(arg);\n") -- 1.5.5.6 From bf39746b4529028e5a79bee3f7bfd34f6084e60f Mon Sep 17 00:00:00 2001 From: Rafael H. Schloming <rhs@apache.org> Date: Wed, 16 Mar 2011 20:30:49 +0000 Subject: [PATCH] BZ-663013 changed python clients durable default to False git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1082290 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/qpid/messaging/driver.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qpid/python/qpid/messaging/driver.py b/qpid/python/qpid/messaging/driver.py index 2eb2c18..91dc597 100644 --- a/qpid/python/qpid/messaging/driver.py +++ b/qpid/python/qpid/messaging/driver.py @@ -66,7 +66,7 @@ class Attachment: # XXX -DURABLE_DEFAULT=True +DURABLE_DEFAULT=False # XXX -- 1.5.5.6 From 737021d726958813d02f294d7cdbd5879d2d8b19 Mon Sep 17 00:00:00 2001 From: Rafael H. Schloming <rhs@apache.org> Date: Thu, 17 Mar 2011 12:47:00 +0000 Subject: [PATCH] BZ-667463 added tcp_nodelay connection option git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1082470 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/qpid/messaging/driver.py | 2 +- qpid/python/qpid/messaging/endpoints.py | 1 + qpid/python/qpid/messaging/transports.py | 18 ++++++++++-------- qpid/python/qpid/tests/messaging/endpoints.py | 12 ++++++++---- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/qpid/python/qpid/messaging/driver.py b/qpid/python/qpid/messaging/driver.py index 91dc597..1323e41 100644 --- a/qpid/python/qpid/messaging/driver.py +++ b/qpid/python/qpid/messaging/driver.py @@ -526,7 +526,7 @@ class Driver: rawlog.debug("OPEN[%s]: %s:%s", self.log_id, host, port) trans = transports.TRANSPORTS.get(self.connection.transport) if trans: - self._transport = trans(host, port) + self._transport = trans(self.connection, host, port) else: raise ConnectError("no such transport: %s" % self.connection.transport) if self._retrying and self._reconnect_log: diff --git a/qpid/python/qpid/messaging/endpoints.py b/qpid/python/qpid/messaging/endpoints.py index 30c5850..cfc89d4 100644 --- a/qpid/python/qpid/messaging/endpoints.py +++ b/qpid/python/qpid/messaging/endpoints.py @@ -158,6 +158,7 @@ class Connection(Endpoint): self.reconnect_log = options.get("reconnect_log", True) self.address_ttl = options.get("address_ttl", 60) + self.tcp_nodelay = options.get("tcp_nodelay", False) self.options = options diff --git a/qpid/python/qpid/messaging/transports.py b/qpid/python/qpid/messaging/transports.py index 8133a45..7abaae1 100644 --- a/qpid/python/qpid/messaging/transports.py +++ b/qpid/python/qpid/messaging/transports.py @@ -17,18 +17,23 @@ # under the License. # +import socket from qpid.util import connect TRANSPORTS = {} -class tcp: +class SocketTransport: - def __init__(self, host, port): + def __init__(self, conn, host, port): self.socket = connect(host, port) + if conn.tcp_nodelay: + self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) def fileno(self): return self.socket.fileno() +class tcp(SocketTransport): + def reading(self, reading): return reading @@ -52,17 +57,14 @@ try: except ImportError: pass else: - class tls: + class tls(SocketTransport): - def __init__(self, host, port): - self.socket = connect(host, port) + def __init__(self, conn, host, port): + SocketTransport.__init__(self, conn, host, port) self.tls = wrap_socket(self.socket) self.socket.setblocking(0) self.state = None - def fileno(self): - return self.socket.fileno() - def reading(self, reading): if self.state is None: return reading diff --git a/qpid/python/qpid/tests/messaging/endpoints.py b/qpid/python/qpid/tests/messaging/endpoints.py index 0977b2a..419d0cb 100644 --- a/qpid/python/qpid/tests/messaging/endpoints.py +++ b/qpid/python/qpid/tests/messaging/endpoints.py @@ -46,6 +46,10 @@ class SetupTests(Base): self.conn.open() self.ping(self.conn.session()) + def testTcpNodelay(self): + self.conn = Connection.establish(self.broker, tcp_nodelay=True) + assert self.conn._driver._transport.socket.getsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY) + def testConnectError(self): try: # Specifying port 0 yields a bad address on Windows; port 4 is unassigned @@ -111,8 +115,8 @@ class SetupTests(Base): class flaky: - def __init__(self, host, port): - self.real = real(host, port) + def __init__(self, conn, host, port): + self.real = real(conn, host, port) self.sent_count = 0 self.recv_count = 0 @@ -251,8 +255,8 @@ class ConnectionTests(Base): class hangable: - def __init__(self, host, port): - self.tcp = TRANSPORTS["tcp"](host, port) + def __init__(self, conn, host, port): + self.tcp = TRANSPORTS["tcp"](conn, host, port) self.hung = False def hang(self): -- 1.5.5.6 From d37dd43ae98063117e03a0d484380363428324d4 Mon Sep 17 00:00:00 2001 From: Rafael H. Schloming <rhs@apache.org> Date: Thu, 17 Mar 2011 13:03:08 +0000 Subject: [PATCH] BZ-663022 added support for address assertion git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1082478 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/qpid/messaging/driver.py | 8 +++++++- qpid/python/qpid/tests/messaging/endpoints.py | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/qpid/python/qpid/messaging/driver.py b/qpid/python/qpid/messaging/driver.py index 1323e41..67b0ff9 100644 --- a/qpid/python/qpid/messaging/driver.py +++ b/qpid/python/qpid/messaging/driver.py @@ -930,6 +930,7 @@ class Engine: def resolve_declare(self, sst, lnk, dir, action): declare = lnk.options.get("create") in ("always", dir) + assrt = lnk.options.get("assert") in ("always", dir) def do_resolved(type, subtype): err = None if type is None: @@ -938,7 +939,12 @@ class Engine: else: err = NotFound(text="no such queue: %s" % lnk.name) else: - action(type, subtype) + if assrt: + expected = lnk.options.get("node", {}).get("type") + if type != expected: + err = AssertionFailed(text="expected %s, got %s" % (expected, type)) + if err is None: + action(type, subtype) if err: tgt = lnk.target diff --git a/qpid/python/qpid/tests/messaging/endpoints.py b/qpid/python/qpid/tests/messaging/endpoints.py index 419d0cb..1929a47 100644 --- a/qpid/python/qpid/tests/messaging/endpoints.py +++ b/qpid/python/qpid/tests/messaging/endpoints.py @@ -1186,6 +1186,13 @@ test-link-bindings-queue; { snd.send(m) self.drain(qrcv, expected=msgs) + def testAssert(self): + try: + snd = self.ssn.sender("amq.topic; {assert: always, node: {type: queue}}") + assert 0, "assertion failed to trigger" + except AssertionFailed, e: + pass + NOSUCH_Q = "this-queue-should-not-exist" UNPARSEABLE_ADDR = "name/subject; {bad options" UNLEXABLE_ADDR = "\0x0\0x1\0x2\0x3" -- 1.5.5.6 From 2dbd460350485ae44c7c5ab646039d619c0db689 Mon Sep 17 00:00:00 2001 From: Rafael H. Schloming <rhs@apache.org> Date: Thu, 17 Mar 2011 21:04:03 +0000 Subject: [PATCH] BZ-633022 only assert if type is specified git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1082697 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/qpid/messaging/driver.py | 2 +- qpid/python/qpid/tests/messaging/endpoints.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qpid/python/qpid/messaging/driver.py b/qpid/python/qpid/messaging/driver.py index 67b0ff9..78af282 100644 --- a/qpid/python/qpid/messaging/driver.py +++ b/qpid/python/qpid/messaging/driver.py @@ -941,7 +941,7 @@ class Engine: else: if assrt: expected = lnk.options.get("node", {}).get("type") - if type != expected: + if expected and type != expected: err = AssertionFailed(text="expected %s, got %s" % (expected, type)) if err is None: action(type, subtype) diff --git a/qpid/python/qpid/tests/messaging/endpoints.py b/qpid/python/qpid/tests/messaging/endpoints.py index 1929a47..db5ec03 100644 --- a/qpid/python/qpid/tests/messaging/endpoints.py +++ b/qpid/python/qpid/tests/messaging/endpoints.py @@ -1186,13 +1186,16 @@ test-link-bindings-queue; { snd.send(m) self.drain(qrcv, expected=msgs) - def testAssert(self): + def testAssert1(self): try: snd = self.ssn.sender("amq.topic; {assert: always, node: {type: queue}}") assert 0, "assertion failed to trigger" except AssertionFailed, e: pass + def testAssert2(self): + snd = self.ssn.sender("amq.topic; {assert: always}") + NOSUCH_Q = "this-queue-should-not-exist" UNPARSEABLE_ADDR = "name/subject; {bad options" UNLEXABLE_ADDR = "\0x0\0x1\0x2\0x3" -- 1.5.5.6 From 6703c60c013a27f183010780f3740741c5b64de6 Mon Sep 17 00:00:00 2001 From: Ted Ross <tross@apache.org> Date: Tue, 29 Mar 2011 18:21:06 +0000 Subject: [PATCH] NO-BZ - Fixed RPMdiff error (DT_NEEDED check) NO-JIRA - Fixed case error in the automake file. This caused a missing dependency in the qpidtypes library. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1086663 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit 2745f289aad11a993cc9e203ca600da620b6d447) --- qpid/cpp/src/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qpid/cpp/src/Makefile.am b/qpid/cpp/src/Makefile.am index 01b7640..9eaa76a 100644 --- a/qpid/cpp/src/Makefile.am +++ b/qpid/cpp/src/Makefile.am @@ -741,7 +741,7 @@ libqpidclient_la_SOURCES = \ QPIDCLIENT_VERSION_INFO = 2:0:0 libqpidclient_la_LDFLAGS = -version-info $(QPIDCLIENT_VERSION_INFO) -libqpidtypes_la_libadd=-luuid +libqpidtypes_la_LIBADD= -luuid libqpidtypes_la_SOURCES= \ qpid/types/Exception.cpp \ qpid/types/Uuid.cpp \ -- 1.5.5.6 From 2f86dec1fd75d4f73349d60b4e846daf36c35636 Mon Sep 17 00:00:00 2001 From: Stephen D. Huston <shuston@apache.org> Date: Fri, 1 Apr 2011 14:52:50 +0000 Subject: [PATCH] Merged r1087341 from trunk to add missing CMakeLists.txt to files to distribute. Fixes QPID-3176. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.10@1087729 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/examples/old_api/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qpid/cpp/examples/old_api/Makefile.am b/qpid/cpp/examples/old_api/Makefile.am index 466eee2..04216ff 100644 --- a/qpid/cpp/examples/old_api/Makefile.am +++ b/qpid/cpp/examples/old_api/Makefile.am @@ -36,7 +36,7 @@ $(MAKEDIST): Makefile examplesdir=$(pkgdatadir)/examples/old_api dist_examples_DATA = $(MAKEDIST) -EXTRA_DIST = README.verify verify verify_all +EXTRA_DIST = README.verify verify verify_all CMakeLists.txt # For older versions of automake abs_top_srcdir = @abs_top_srcdir@ -- 1.5.5.6 From 4b2b6f1f10c8a464bf7596202afe7b1116a8d1d4 Mon Sep 17 00:00:00 2001 From: Gordon Sim <gsim@apache.org> Date: Mon, 4 Apr 2011 14:25:25 +0000 Subject: [PATCH] QPID-3174: remove unnecessary enqueueComplete() calls (merge of r1087868 and r1088539) git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.10@1088634 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/broker/Queue.cpp | 6 +++--- qpid/cpp/src/qpid/broker/RecoveredDequeue.cpp | 1 - qpid/cpp/src/qpid/broker/RecoveredEnqueue.cpp | 1 - qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp | 1 - qpid/cpp/src/qpid/broker/TxPublish.cpp | 9 +-------- 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/qpid/cpp/src/qpid/broker/Queue.cpp b/qpid/cpp/src/qpid/broker/Queue.cpp index 7a266fb..8efa8be 100644 --- a/qpid/cpp/src/qpid/broker/Queue.cpp +++ b/qpid/cpp/src/qpid/broker/Queue.cpp @@ -183,7 +183,6 @@ void Queue::recover(boost::intrusive_ptr<Message>& msg){ // setup synclist for recovered messages, so they don't get re-stored on lastNodeFailure msg->addToSyncList(shared_from_this(), store); } - msg->enqueueComplete(); // mark the message as enqueued if (store && (!msg->isContentLoaded() || msg->checkContentReleasable())) { //content has not been loaded, need to ensure that lazy loading mode is set: @@ -210,7 +209,6 @@ void Queue::requeue(const QueuedMessage& msg){ { Mutex::ScopedLock locker(messageLock); if (!isEnqueued(msg)) return; - msg.payload->enqueueComplete(); // mark the message as enqueued messages->reinsert(msg); listeners.populate(copy); @@ -632,7 +630,9 @@ bool Queue::enqueue(TransactionContext* ctxt, boost::intrusive_ptr<Message>& msg } if ((msg->isPersistent() || msg->checkContentReleasable()) && store) { - msg->enqueueAsync(shared_from_this(), store); //increment to async counter -- for message sent to more than one queue + // mark the message as being enqueued - the store MUST CALL msg->enqueueComplete() + // when it considers the message stored. + msg->enqueueAsync(shared_from_this(), store); boost::intrusive_ptr<PersistableMessage> pmsg = boost::static_pointer_cast<PersistableMessage>(msg); store->enqueue(ctxt, pmsg, *this); return true; diff --git a/qpid/cpp/src/qpid/broker/RecoveredDequeue.cpp b/qpid/cpp/src/qpid/broker/RecoveredDequeue.cpp index 38cb804..cd67353 100644 --- a/qpid/cpp/src/qpid/broker/RecoveredDequeue.cpp +++ b/qpid/cpp/src/qpid/broker/RecoveredDequeue.cpp @@ -43,7 +43,6 @@ void RecoveredDequeue::commit() throw() void RecoveredDequeue::rollback() throw() { - msg->enqueueComplete(); queue->process(msg); } diff --git a/qpid/cpp/src/qpid/broker/RecoveredEnqueue.cpp b/qpid/cpp/src/qpid/broker/RecoveredEnqueue.cpp index 6263c63..6d2eaee 100644 --- a/qpid/cpp/src/qpid/broker/RecoveredEnqueue.cpp +++ b/qpid/cpp/src/qpid/broker/RecoveredEnqueue.cpp @@ -36,7 +36,6 @@ bool RecoveredEnqueue::prepare(TransactionContext*) throw(){ } void RecoveredEnqueue::commit() throw(){ - msg->enqueueComplete(); queue->process(msg); } diff --git a/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp b/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp index 6f8b125..d084096 100644 --- a/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp +++ b/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp @@ -252,7 +252,6 @@ void RecoverableMessageImpl::dequeue(DtxBuffer::shared_ptr buffer, Queue::shared void RecoverableMessageImpl::enqueue(DtxBuffer::shared_ptr buffer, Queue::shared_ptr queue) { - msg->enqueueComplete(); // recoved nmessage to enqueued in store already buffer->enlist(TxOp::shared_ptr(new RecoveredEnqueue(queue, msg))); } diff --git a/qpid/cpp/src/qpid/broker/TxPublish.cpp b/qpid/cpp/src/qpid/broker/TxPublish.cpp index 36a451e..9c2cf4a 100644 --- a/qpid/cpp/src/qpid/broker/TxPublish.cpp +++ b/qpid/cpp/src/qpid/broker/TxPublish.cpp @@ -90,14 +90,7 @@ void TxPublish::deliverTo(const boost::shared_ptr<Queue>& queue){ void TxPublish::prepare(TransactionContext* ctxt, const boost::shared_ptr<Queue> queue) { - if (!queue->enqueue(ctxt, msg)){ - /** - * if not store then mark message for ack and deleivery once - * commit happens, as async IO will never set it when no store - * exists - */ - msg->enqueueComplete(); - } + queue->enqueue(ctxt, msg); } TxPublish::Commit::Commit(intrusive_ptr<Message>& _msg) : msg(_msg){} -- 1.5.5.6
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor