summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-03 06:56:11 +0000
committerJeremy Allison <jra@samba.org>2001-03-03 06:56:11 +0000
commite95f9ec18b271e80737ed0759c819ad6331b8302 (patch)
tree6ce84c8b24265d9d3e5e3568f9becd93385d6af7 /source
parentf8ab3684efa23b7309c4e43d9a2f94bab36fc17b (diff)
downloadsamba-e95f9ec18b271e80737ed0759c819ad6331b8302.tar.gz
samba-e95f9ec18b271e80737ed0759c819ad6331b8302.tar.xz
samba-e95f9ec18b271e80737ed0759c819ad6331b8302.zip
Hmmmmm. Ok - the talloc_realloc code works fine under insure with 500 jobs
in a queue.... Jeremy.
Diffstat (limited to 'source')
-rw-r--r--source/printing/nt_printing.c6
-rw-r--r--source/rpc_server/srv_spoolss_nt.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c
index f7fd6ab79dd..67455b39745 100644
--- a/source/printing/nt_printing.c
+++ b/source/printing/nt_printing.c
@@ -2160,7 +2160,7 @@ static int unpack_specifics(NT_PRINTER_PARAM **list, char *buf, int buflen)
/****************************************************************************
get a default printer info 2 struct
****************************************************************************/
-static uint32 get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstring sharename)
+static uint32 get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 **info_ptr, char *sharename)
{
extern pstring global_myname;
int snum;
@@ -2233,7 +2233,7 @@ static uint32 get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstrin
/****************************************************************************
****************************************************************************/
-static uint32 get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstring sharename)
+static uint32 get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, char *sharename)
{
pstring key;
NT_PRINTER_INFO_LEVEL_2 info;
@@ -2456,7 +2456,7 @@ uint32 add_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level)
Get a NT_PRINTER_INFO_LEVEL struct. It returns malloced memory.
****************************************************************************/
-uint32 get_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level, fstring sharename)
+uint32 get_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level, char *sharename)
{
uint32 result;
NT_PRINTER_INFO_LEVEL *printer = NULL;
diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c
index 9175bae1521..2b5bdca5ad7 100644
--- a/source/rpc_server/srv_spoolss_nt.c
+++ b/source/rpc_server/srv_spoolss_nt.c
@@ -1994,12 +1994,13 @@ static void spoolss_notify_submitted_time(int snum,
{
struct tm *t;
uint32 len;
+ SYSTEMTIME st;
t=gmtime(&queue->time);
len = sizeof(SYSTEMTIME);
- data->notify_data.data.length = len;
+ data->notify_data.data.length = len/2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
if (!data->notify_data.data.string) {
@@ -2007,7 +2008,8 @@ static void spoolss_notify_submitted_time(int snum,
return;
}
- make_systemtime((SYSTEMTIME*)(data->notify_data.data.string), t);
+ make_systemtime(&st, t);
+ memcpy(data->notify_data.data.string,&st,len);
}
#define END 65535