1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-22 07:17:05 +03:00

20 Commits

Author SHA1 Message Date
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. -