mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s3-spoolss: Make spoolss_Time_to_time_t public.
Signed-off-by: Günther Deschner <gd@samba.org>
This commit is contained in:
parent
1cdc46a90a
commit
3c1e9a8c33
@ -5612,6 +5612,7 @@ WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli,
|
||||
|
||||
bool init_systemtime(struct spoolss_Time *r,
|
||||
struct tm *unixtime);
|
||||
time_t spoolss_Time_to_time_t(const struct spoolss_Time *r);
|
||||
WERROR pull_spoolss_PrinterData(TALLOC_CTX *mem_ctx,
|
||||
const DATA_BLOB *blob,
|
||||
union spoolss_PrinterData *data,
|
||||
|
@ -41,6 +41,21 @@ bool init_systemtime(struct spoolss_Time *r,
|
||||
return true;
|
||||
}
|
||||
|
||||
time_t spoolss_Time_to_time_t(const struct spoolss_Time *r)
|
||||
{
|
||||
struct tm unixtime;
|
||||
|
||||
unixtime.tm_year = r->year - 1900;
|
||||
unixtime.tm_mon = r->month - 1;
|
||||
unixtime.tm_wday = r->day_of_week;
|
||||
unixtime.tm_mday = r->day;
|
||||
unixtime.tm_hour = r->hour;
|
||||
unixtime.tm_min = r->minute;
|
||||
unixtime.tm_sec = r->second;
|
||||
|
||||
return mktime(&unixtime);
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
********************************************************************/
|
||||
|
||||
|
@ -533,21 +533,6 @@ static int printq_spoolss_status(int v)
|
||||
return RAP_QUEUE_STATUS_ERROR;
|
||||
}
|
||||
|
||||
static time_t spoolss_Time_to_time_t(const struct spoolss_Time *r)
|
||||
{
|
||||
struct tm unixtime;
|
||||
|
||||
unixtime.tm_year = r->year - 1900;
|
||||
unixtime.tm_mon = r->month - 1;
|
||||
unixtime.tm_wday = r->day_of_week;
|
||||
unixtime.tm_mday = r->day;
|
||||
unixtime.tm_hour = r->hour;
|
||||
unixtime.tm_min = r->minute;
|
||||
unixtime.tm_sec = r->second;
|
||||
|
||||
return mktime(&unixtime);
|
||||
}
|
||||
|
||||
static void fill_spoolss_printjob_info(int uLevel,
|
||||
struct pack_desc *desc,
|
||||
struct spoolss_JobInfo2 *info2,
|
||||
|
Loading…
Reference in New Issue
Block a user