[gnome-control-center] printers: Don't ask for samba password if not needed
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Don't ask for samba password if not needed
- Date: Tue, 19 Feb 2013 13:35:31 +0000 (UTC)
commit 1cadc214ef2f87957269d38c635fbdb3b9be9121
Author: Marek Kasik <mkasik redhat com>
Date: Tue Feb 19 12:56:10 2013 +0100
printers: Don't ask for samba password if not needed
Ask for samba password only if returned directory is NULL
and errno is set to EACCES.
https://bugzilla.gnome.org/show_bug.cgi?id=694150
panels/printers/pp-samba.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/panels/printers/pp-samba.c b/panels/printers/pp-samba.c
index 299c551..b8b47e7 100644
--- a/panels/printers/pp-samba.c
+++ b/panels/printers/pp-samba.c
@@ -345,7 +345,7 @@ list_dir (SMBCCTX *smb_context,
smbclient_opendir = smbc_getFunctionOpendir (smb_context);
dir = smbclient_opendir (smb_context, dirname);
- if (!dir)
+ if (!dir && errno == EACCES)
{
smbc_setFunctionAuthDataWithContext (smb_context, auth_fn);
dir = smbclient_opendir (smb_context, dirname);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]