incorporated ilseents.xml file into opac
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 5 Dec 2005 19:23:45 +0000 (19:23 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 5 Dec 2005 19:23:45 +0000 (19:23 +0000)
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
src/srfsh/srfsh.c

index d903395..810d9d8 100644 (file)
@@ -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;
        }
 
index 445139e..294c5d5 100644 (file)
@@ -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 );