[gtk-vnc] Drop the connection if some credentials cannot be set
- From: Daniel P. Berrange <dberrange src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Drop the connection if some credentials cannot be set
- Date: Tue, 25 Aug 2009 10:50:00 +0000 (UTC)
commit f4e1519123c937b63cea584bcd7435b7c97815b0
Author: John Haxby <john haxby oracle com>
Date: Tue Aug 25 11:47:55 2009 +0100
Drop the connection if some credentials cannot be set
* examples/gvncviewer.py: Close VNC connection if setting a credential
fails
examples/gvncviewer.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/examples/gvncviewer.py b/examples/gvncviewer.py
index 2debf76..9a74268 100644
--- a/examples/gvncviewer.py
+++ b/examples/gvncviewer.py
@@ -131,7 +131,9 @@ def vnc_auth_cred(src, credList):
for i in range(len(credList)):
if i < len(data) and data[i] != None:
- src.set_credential(credList[i], data[i])
+ if src.set_credential(credList[i], data[i]):
+ print "Cannot set credential type %d" % (credList[i])
+ src.close()
else:
print "Unsupported credential type %d" % (credList[i])
src.close()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]