summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2010-05-07 09:26:41 -0400
committerGünther Deschner <gd@samba.org>2010-05-09 23:33:40 +0200
commit3c1e9a8c3367733724b7e89e930f9ac0b3348fff (patch)
tree6eb5c4e78059a6ae91bbad2dfa33fcbbfc1bd256 /source3
parent1cdc46a90afed2b6f0e85427850f62b3b7ef1bc3 (diff)
downloadsamba-3c1e9a8c3367733724b7e89e930f9ac0b3348fff.tar.gz
samba-3c1e9a8c3367733724b7e89e930f9ac0b3348fff.tar.bz2
samba-3c1e9a8c3367733724b7e89e930f9ac0b3348fff.zip
s3-spoolss: Make spoolss_Time_to_time_t public.
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/rpc_client/init_spoolss.c15
-rw-r--r--source3/smbd/lanman.c15
3 files changed, 16 insertions, 15 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 10c3d14fcb..9199703c0e 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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,
diff --git a/source3/rpc_client/init_spoolss.c b/source3/rpc_client/init_spoolss.c
index 4c105ea3bc..8320d14fe6 100644
--- a/source3/rpc_client/init_spoolss.c
+++ b/source3/rpc_client/init_spoolss.c
@@ -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);
+}
+
/*******************************************************************
********************************************************************/
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 101fad9dbb..6fdad2cb13 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -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,