From fe30d239078682f0ac141fef42c805c797576cd1 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 5 Dec 2005 19:23:45 +0000 Subject: [PATCH] incorporated ilseents.xml file into opac added an event entity to lang.dtd update auth code to return the auth failed event when necessary updated srfsh to handle the auth event added a oils_constants file for listing events the C code will use git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@598 9efc2488-bf62-4759-914b-345cdb29e865 --- src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm | 4 ++-- src/srfsh/srfsh.c | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm b/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm index d903395..810d9d8 100644 --- a/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm +++ b/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm @@ -468,13 +468,13 @@ sub initialize { # --- 5 tries to connect to the jabber server my $socket; for(1..5) { - $logger->transport( "$jid: Attempting to connect to server...$host:$port (Try # $_)", WARN ); $socket = $sock_type->new( PeerHost => $host, PeerPort => $port, Peer => $port, Proto => 'tcp' ); - $logger->transport( "$jid: $_ connect attempt to $host:$port", WARN ); + $logger->debug( "$jid: $_ connect attempt to $host:$port"); last if ( $socket and $socket->connected ); + $logger->warn( "$jid: Failed to connect to server...$host:$port (Try # $_)"); sleep 3; } diff --git a/src/srfsh/srfsh.c b/src/srfsh/srfsh.c index 445139e..294c5d5 100644 --- a/src/srfsh/srfsh.c +++ b/src/srfsh/srfsh.c @@ -277,8 +277,12 @@ int handle_login( char* words[]) { parse_request( buf2 ); - char* x = jsonObjectGetString(last_result->_result_content); - if(x) login_session = strdup(x); + jsonObject* x = last_result->_result_content; + if(x) { + char* authtoken = jsonObjectGetString(jsonObjectGetKey(x, "authtoken")); + if(authtoken) login_session = strdup(authtoken); + else login_session = NULL; + } else login_session = NULL; printf("Login Session: %s\n", login_session ); -- 2.11.0