[Opensrf-commits] r1131 - in trunk/src/perlmods/OpenSRF: .
Transport/SlimJabber
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Nov 20 14:03:58 EST 2007
Author: miker
Date: 2007-11-20 13:46:25 -0500 (Tue, 20 Nov 2007)
New Revision: 1131
Modified:
trunk/src/perlmods/OpenSRF/AppSession.pm
trunk/src/perlmods/OpenSRF/Transport.pm
trunk/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm
trunk/src/perlmods/OpenSRF/Transport/SlimJabber/MessageWrapper.pm
Log:
pushing locale through in the perl
Modified: trunk/src/perlmods/OpenSRF/AppSession.pm
===================================================================
--- trunk/src/perlmods/OpenSRF/AppSession.pm 2007-11-19 03:19:09 UTC (rev 1130)
+++ trunk/src/perlmods/OpenSRF/AppSession.pm 2007-11-20 18:46:25 UTC (rev 1131)
@@ -544,6 +544,7 @@
$self->{peer_handle}->send(
to => $self->remote_id,
thread => $self->session_id,
+ locale => $self->session_locale,
body => $json );
if( $disconnect) {
Modified: trunk/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm
===================================================================
--- trunk/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm 2007-11-19 03:19:09 UTC (rev 1130)
+++ trunk/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm 2007-11-20 18:46:25 UTC (rev 1131)
@@ -406,6 +406,7 @@
my $thread = $params{'thread'} || "";
my $router_command = $params{'router_command'} || "";
my $router_class = $params{'router_class'} || "";
+ my $locale = $params{'locale'} || "";
my $msg = OpenSRF::Transport::SlimJabber::MessageWrapper->new;
@@ -414,7 +415,8 @@
$msg->setBody( $body );
$msg->set_router_command( $router_command );
$msg->set_router_class( $router_class );
- $msg->set_osrf_xid($logger->get_osrf_xid);
+ $msg->set_locale( $locale );
+ $msg->set_osrf_xid($logger->get_osrf_xid);
$logger->transport(
"JabberClient Sending message to $to with thread $thread and body: \n$body", INTERNAL );
Modified: trunk/src/perlmods/OpenSRF/Transport/SlimJabber/MessageWrapper.pm
===================================================================
--- trunk/src/perlmods/OpenSRF/Transport/SlimJabber/MessageWrapper.pm 2007-11-19 03:19:09 UTC (rev 1130)
+++ trunk/src/perlmods/OpenSRF/Transport/SlimJabber/MessageWrapper.pm 2007-11-20 18:46:25 UTC (rev 1131)
@@ -122,5 +122,16 @@
$self->{msg_node}->getAttribute('osrf_xid');
}
+sub set_locale {
+ my( $self, $xid ) = @_;
+ $self->{msg_node}->setAttribute( locale => $xid );
+}
+
+sub get_locale {
+ my $self = shift;
+ $self->{msg_node}->getAttribute('locale');
+}
+
+
1;
Modified: trunk/src/perlmods/OpenSRF/Transport.pm
===================================================================
--- trunk/src/perlmods/OpenSRF/Transport.pm 2007-11-19 03:19:09 UTC (rev 1130)
+++ trunk/src/perlmods/OpenSRF/Transport.pm 2007-11-20 18:46:25 UTC (rev 1131)
@@ -87,6 +87,7 @@
# Extract message information
my $remote_id = $helper->get_remote_id();
my $sess_id = $helper->get_sess_id();
+ my $locale = $helper->get_locale();
my $body = $helper->get_body();
my $type = $helper->get_msg_type();
@@ -152,6 +153,8 @@
}
}
+ # set the locale for the session, if passed
+ $app_session->session_locale($locale) if ($locale);
# cycle through and pass each oilsMessage contained in the message
# up to the message layer for processing.
More information about the opensrf-commits
mailing list