[OpenSRF-GIT] OpenSRF branch master updated. 6cdd5251ac64651534e579f7e02a70a665f60283
Evergreen Git
git at git.evergreen-ils.org
Wed Aug 20 17:16:02 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OpenSRF".
The branch, master has been updated
via 6cdd5251ac64651534e579f7e02a70a665f60283 (commit)
from 54da75bd2f045dbd2225317f74dc5fe38f415fe5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6cdd5251ac64651534e579f7e02a70a665f60283
Author: Bill Erickson <berick at esilibrary.com>
Date: Thu Jul 17 11:37:53 2014 -0400
LP#1341687 listeners log/drop XMPP error msgs
The most common form of XMPP error messages are "bounced" messages, i.e.
those where the recipient is not available. Instead of passing these
useless and confusing messages down to a drone for processing, log the
error in the listener and drop the message.
Signed-off-by: Bill Erickson <berick at esilibrary.com>
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
diff --git a/src/libopensrf/osrf_prefork.c b/src/libopensrf/osrf_prefork.c
index 6409e6b..658fd8c 100644
--- a/src/libopensrf/osrf_prefork.c
+++ b/src/libopensrf/osrf_prefork.c
@@ -869,6 +869,15 @@ static void prefork_run( prefork_simple* forker ) {
continue;
}
+ if (cur_msg->error_type) {
+ osrfLogInfo(OSRF_LOG_MARK,
+ "Listener received an XMPP error message. "
+ "Likely a bounced message. sender=%s", cur_msg->sender);
+ if(child_dead)
+ reap_children(forker);
+ continue;
+ }
+
message_prepare_xml( cur_msg );
const char* msg_data = cur_msg->msg_xml;
if( ! msg_data || ! *msg_data ) {
diff --git a/src/perl/lib/OpenSRF/Server.pm b/src/perl/lib/OpenSRF/Server.pm
index 48197a7..dcf44fe 100644
--- a/src/perl/lib/OpenSRF/Server.pm
+++ b/src/perl/lib/OpenSRF/Server.pm
@@ -167,7 +167,11 @@ sub run {
if($msg) {
- if(my $child = pop(@{$self->{idle_list}})) {
+ if ($msg->type and $msg->type eq 'error') {
+ $logger->info("server: Listener received an XMPP error ".
+ "message. Likely a bounced message. sender=".$msg->from);
+
+ } elsif(my $child = pop(@{$self->{idle_list}})) {
# we have an idle child to handle the request
$chatty and $logger->internal("server: passing request to idle child $child");
-----------------------------------------------------------------------
Summary of changes:
src/libopensrf/osrf_prefork.c | 9 +++++++++
src/perl/lib/OpenSRF/Server.pm | 6 +++++-
2 files changed, 14 insertions(+), 1 deletions(-)
hooks/post-receive
--
OpenSRF
More information about the opensrf-commits
mailing list