diff options
author | Jeremy Allison <jra@samba.org> | 2000-10-29 17:27:41 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-10-29 17:27:41 +0000 |
commit | c33d0e466dbcbb5dfa68250bec031af7503bd2fa (patch) | |
tree | e4b7d0f43e9031d02b936d5023eb7e9e2fcbf134 /source3/rpc_server | |
parent | e2d1dd47d8f873a10d8f84253182059c50a229c8 (diff) | |
download | samba-c33d0e466dbcbb5dfa68250bec031af7503bd2fa.tar.gz samba-c33d0e466dbcbb5dfa68250bec031af7503bd2fa.tar.bz2 samba-c33d0e466dbcbb5dfa68250bec031af7503bd2fa.zip |
Patches from John Reilly @ HP for print job time bugs.
Jeremy.
(This used to be commit 0eb7f2d514317882684e9c0c51d46b1ac1eb2568)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index ebcccc8cf4..9c0a3319f5 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1381,6 +1381,19 @@ static void spoolss_notify_job_position(int snum, SPOOL_NOTIFY_INFO_DATA *data, data->notify_data.value[0]=queue->job; } +/******************************************************************* + * fill a notify_info_data with + ********************************************************************/ +static void spoolss_notify_submitted_time(int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer) +{ + struct tm *t; + + t=gmtime(&queue->time); + + data->notify_data.data.length = sizeof(SYSTEMTIME); + make_systemtime((SYSTEMTIME*)(data->notify_data.data.string), t); +} + #define END 65535 struct s_notify_info_data_table @@ -1438,7 +1451,7 @@ struct s_notify_info_data_table notify_info_data_table[] = { JOB_NOTIFY_TYPE, JOB_NOTIFY_DOCUMENT, "JOB_NOTIFY_DOCUMENT", POINTER, spoolss_notify_job_name }, { JOB_NOTIFY_TYPE, JOB_NOTIFY_PRIORITY, "JOB_NOTIFY_PRIORITY", ONE_VALUE, spoolss_notify_priority }, { JOB_NOTIFY_TYPE, JOB_NOTIFY_POSITION, "JOB_NOTIFY_POSITION", ONE_VALUE, spoolss_notify_job_position }, -{ JOB_NOTIFY_TYPE, JOB_NOTIFY_SUBMITTED, "JOB_NOTIFY_SUBMITTED", POINTER, NULL }, +{ JOB_NOTIFY_TYPE, JOB_NOTIFY_SUBMITTED, "JOB_NOTIFY_SUBMITTED", POINTER, spoolss_notify_submitted_time }, { JOB_NOTIFY_TYPE, JOB_NOTIFY_START_TIME, "JOB_NOTIFY_START_TIME", ONE_VALUE, spoolss_notify_start_time }, { JOB_NOTIFY_TYPE, JOB_NOTIFY_UNTIL_TIME, "JOB_NOTIFY_UNTIL_TIME", ONE_VALUE, spoolss_notify_until_time }, { JOB_NOTIFY_TYPE, JOB_NOTIFY_TIME, "JOB_NOTIFY_TIME", ONE_VALUE, spoolss_notify_job_time }, @@ -3696,9 +3709,8 @@ static void fill_job_info_1(JOB_INFO_1 *job_info, print_queue_struct *queue, pstring temp_name; struct tm *t; - time_t unixdate = time(NULL); - t=gmtime(&unixdate); + t=gmtime(&queue->time); snprintf(temp_name, sizeof(temp_name), "\\\\%s", global_myname); job_info->jobid=queue->job; @@ -3725,14 +3737,12 @@ static BOOL fill_job_info_2(JOB_INFO_2 *job_info, print_queue_struct *queue, pstring temp_name; NT_PRINTER_INFO_LEVEL *ntprinter = NULL; pstring chaine; - struct tm *t; - time_t unixdate = time(NULL); if (get_a_printer(&ntprinter, 2, lp_servicename(snum)) !=0 ) return False; - t=gmtime(&unixdate); + t=gmtime(&queue->time); snprintf(temp_name, sizeof(temp_name), "\\\\%s", global_myname); job_info->jobid=queue->job; |