[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [soprano] client: Fix soprano error reporting / connection status bug
From:       Simeon Bird <spb () ias ! edu>
Date:       2012-12-18 17:12:00
Message-ID: 20121218171200.67A51A6091 () git ! kde ! org
[Download RAW message or body]

Git commit 6a3fadb5bc005eed8406e4ed72ede1e5e6905ffe by Simeon Bird.
Committed on 18/12/2012 at 18:09.
Pushed by sbird into branch 'master'.

Fix soprano error reporting / connection status bug

M  +1    -0    client/localsocketclient.cpp
M  +1    -0    client/socket.cpp

http://commits.kde.org/soprano/6a3fadb5bc005eed8406e4ed72ede1e5e6905ffe

diff --git a/client/localsocketclient.cpp b/client/localsocketclient.cpp
index 48ac0a0..6fc35c6 100644
--- a/client/localsocketclient.cpp
+++ b/client/localsocketclient.cpp
@@ -131,6 +131,7 @@ bool Soprano::Client::LocalSocketClient::connect( const QString& \
name )  return true;
         }
         else {
+            setError( d->connection.lastError() );
             return false;
         }
     }
diff --git a/client/socket.cpp b/client/socket.cpp
index 8c3ed04..9c66ea4 100644
--- a/client/socket.cpp
+++ b/client/socket.cpp
@@ -220,6 +220,7 @@ bool Soprano::LocalSocket::open()
     if ( ::connect( m_handle, (struct sockaddr *)&servAddr, sizeof( servAddr ) ) < 0 \
                ) {
         setError( QString::fromLatin1( "Could not connect to server at %1 (%2)" \
).arg( m_path ).arg( strerror(errno) ) );  ::close( m_handle );
+        m_handle = -1;
         return false;
     }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic