1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-06 16:23:49 +03:00
Commit Graph

33 Commits

Author SHA1 Message Date
Deryck Hodge
fd5bcecceb r15385: Some work to bring the python code up to date with the
rpc client rewrite.
2007-10-10 11:16:38 -05:00
Jeremy Allison
4b7a60e95e r10802: Janitor for tpot - remember to keep 3.0 in sync.
Jeremy.
2007-10-10 11:04:54 -05:00
Gerald Carter
cd961e50a3 r8654: merging cli_spoolss_XX() updates from trunk 2007-10-10 11:00:14 -05:00
Lars Müller
8cfa6873c2 r7960: Replace unknown SMB_XSTRDUP by known SMB_STRDUP macro.
I still don't know why the compile doesn't fail.
2007-10-10 10:58:04 -05:00
Gerald Carter
f629bffb1a r6678: fix python python after talloc() shakeup 2007-10-10 10:56:50 -05:00
Tim Potter
0308a0a112 Merge of compiler warning fixups. -
Tim Potter
3026a5ef15 Merge of some commentary for getprinter info levels supported by win2k+ -
Tim Potter
225182a3a3 Sync up compiler warning fixes. -
Jeremy Allison
aa8439a49e Finish adding strings to all talloc_init() calls.
Jeremy.
-
Tim Potter
0310e539bb Sync with HEAD. -
Tim Potter
fc5e186821 Fix crash bugs in getprinter info level code (yay unit tests).
Let the cli_spoolss function return invalid info level error rather
than checking for it ourselves.
-
Tim Potter
55f891016c New arguments to cli_spoolss_enum_printers() -
Tim Potter
ef5c9698b0 Another compile fix. -
Tim Potter
f5a1a3190d Raise a ValueError if server names aren't given in UNC format. -
Tim Potter
166aee6cc2 Allow None to be used as a valid credential for functions that take a
credential as a parameter.
-
Tim Potter
c75bbda102 Use new version of open_pipe_creds() function.
Don't attempt to free client state returned by cli_full_connection()

Fix memory leaks on error.

Allow setprinter level 1 - doesn't work though.

Extended interface to enumprinters().  The name value passed in the RPC
request can be different from the server name in which case lots of weird
and wonderful information is returned.  Defaults to the server name.
-
Tim Potter
d4c7a85c2b Use get_level_value() utility fn.
Cleaned up some local variable naming.
-
Tim Potter
1d0fd34d42 Fix memory leaks and return values in error returns for enumprinters().
Return enumerated printers as a hash of hashes instead of a list of hashes.
-
Tim Potter
d35cad359d More cleanups.
- removed dodgy fprintf() error handling

 - return an error string from open_pipe_creds() so the appropriate
   exception can be raised by the caller

 - reformatting
-
Tim Potter
36ed06cb50 Refactored open_pipe_creds() function to remove unused parameter. -
Tim Potter
986d868837 Renamed functions that are methods of a printer handle object from
spoolss_* to spoolss_hnd_* to make things a bit clearer.
-
Tim Potter
b56bf8f43e Fixed a memory leak in enumprinters.
Started addprinterex() - doesn't work yet.
-
Tim Potter
f7fadfdd73 Moved PyDict_SetItemString for printer info level structures into conv functions. -
Tim Potter
39f58333fa Changed some error returns to return a werror tuple (status code and text
message) instead of just the status code.
-
Tim Potter
0f464fc791 Got setprinter level 3 working!
Replaced some DEBUG's with PyErr_SetString() calls.
-
Tim Potter
c02a7a71d6 Return exception text if getprinter level not [0..3] -
Tim Potter
38d2b1794a Started working on setprinter code. -
Tim Potter
4bf6a9830a Rename new_policy_hnd_object() to new_spoolss_policy_hnd_object() -
Tim Potter
4114fe5996 Call PyErr_SetString instead of fprintf to stderr.
Don't clean up talloc and cli_state on close printer.  They will be
destroyed in the handle dealloc function.
-
Tim Potter
e0a209bf29 Removed unused label. -
Tim Potter
abe39ebcc1 Throw a spoolss.werror exception when the rpc client routines return
errors.

Move to new system of converting between structures and python
dictionaries.  Lots of stuff moved to py_spoolss_printers_conv.c

Setprinter level 2 kind of works now.
-
Tim Potter
1e48f872a4 Aborted experiment to avoid namespace pollution and prototype hell and
moved to 'make proto' based solution.
-
Tim Potter
eb8cd68bc9 Moved general printer related calls here. -