- Better debugging for pysmbc.

This commit is contained in:
Tim Waugh 2008-07-08 14:59:17 +00:00
parent 0900e74f0e
commit c5a200e638
3 changed files with 82 additions and 1 deletions

31
pysmbc-debug.patch Normal file
View File

@ -0,0 +1,31 @@
diff -U0 pysmbc-1.0.4/ChangeLog.debug pysmbc-1.0.4/ChangeLog
--- pysmbc-1.0.4/ChangeLog.debug 2008-06-20 12:15:30.000000000 +0100
+++ pysmbc-1.0.4/ChangeLog 2008-07-08 15:39:43.000000000 +0100
@@ -0,0 +1,5 @@
+2008-06-24 Tim Waugh <twaugh@redhat.com>
+
+ * context.c (Context_init): Set the debug level during the Context
+ constructor.
+
diff -up pysmbc-1.0.4/context.c.debug pysmbc-1.0.4/context.c
--- pysmbc-1.0.4/context.c.debug 2008-06-20 12:14:17.000000000 +0100
+++ pysmbc-1.0.4/context.c 2008-07-08 15:39:43.000000000 +0100
@@ -100,7 +100,7 @@ static int
Context_init (Context *self, PyObject *args, PyObject *kwds)
{
PyObject *auth = NULL;
- int debug = 0;
+ int debug = -1;
unsigned int flags = 0;
SMBCCTX *ctx;
static char *kwlist[] =
@@ -149,6 +149,9 @@ Context_init (Context *self, PyObject *a
return -1;
}
+ if (debug != -1)
+ smbc_setDebug (ctx, debug);
+
self->context = ctx;
smbc_setOptionUserData (ctx, self);
if (auth)

View File

@ -0,0 +1,39 @@
diff -up system-config-printer-1.0.3/system-config-printer.py.debug system-config-printer-1.0.3/system-config-printer.py
--- system-config-printer-1.0.3/system-config-printer.py.debug 2008-06-30 16:23:05.000000000 +0100
+++ system-config-printer-1.0.3/system-config-printer.py 2008-07-08 15:56:56.000000000 +0100
@@ -3562,7 +3562,7 @@ class NewPrinterGUI(GtkGUI):
debug = 0
if get_debugging ():
- debug = 1
+ debug = 10
smbc_auth = pysmb.AuthContext (self.SMBBrowseDialog)
ctx = pysmb.smbc.Context (debug=debug,
auth_fn=smbc_auth.callback)
@@ -3702,7 +3702,7 @@ class NewPrinterGUI(GtkGUI):
uri = "smb://%s" % entry.name
debug = 0
if get_debugging ():
- debug = 1
+ debug = 10
smbc_auth = pysmb.AuthContext (self.SMBBrowseDialog)
ctx = pysmb.smbc.Context (debug=debug,
auth_fn=smbc_auth.callback)
@@ -3741,7 +3741,7 @@ class NewPrinterGUI(GtkGUI):
uri = "smb://%s" % entry.name
debug = 0
if get_debugging ():
- debug = 1
+ debug = 10
smbc_auth = pysmb.AuthContext (self.SMBBrowseDialog)
ctx = pysmb.smbc.Context (debug=debug,
auth_fn=smbc_auth.callback)
@@ -3852,7 +3852,7 @@ class NewPrinterGUI(GtkGUI):
try:
debug = 0
if get_debugging ():
- debug = 1
+ debug = 10
if auth_set:
# No prompting.

View File

@ -7,7 +7,7 @@
Summary: A printer administration tool Summary: A printer administration tool
Name: system-config-printer Name: system-config-printer
Version: 1.0.3 Version: 1.0.3
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/ URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base Group: System Environment/Base
@ -15,6 +15,9 @@ Source0: http://cyberelk.net/tim/data/system-config-printer/1.0.x/system-config-
Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2 Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2
Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2
Patch0: system-config-printer-debug.patch
Patch1: pysmbc-debug.patch
BuildRequires: cups-devel >= 1.2 BuildRequires: cups-devel >= 1.2
BuildRequires: python-devel >= 2.4 BuildRequires: python-devel >= 2.4
BuildRequires: libsmbclient-devel >= 3.2 BuildRequires: libsmbclient-devel >= 3.2
@ -60,6 +63,11 @@ the configuration tool.
%prep %prep
%setup -q -a 1 -a 2 %setup -q -a 1 -a 2
%patch0 -p1 -b .debug
pushd pysmbc-%{pysmbc_version}
%patch1 -p1 -b .debug
popd
%build %build
%configure %configure
@ -146,6 +154,9 @@ rm -rf %buildroot
exit 0 exit 0
%changelog %changelog
* Tue Jul 8 2008 Tim Waugh <twaugh@redhat.com> 1.0.3-2
- Better debugging for pysmbc.
* Mon Jun 30 2008 Tim Waugh <twaugh@redhat.com> 1.0.3-1 * Mon Jun 30 2008 Tim Waugh <twaugh@redhat.com> 1.0.3-1
- Updated pycups to 1.9.40. - Updated pycups to 1.9.40.
- 1.0.3. - 1.0.3.