summaryrefslogtreecommitdiff
path: root/source3/libsmb/clirap.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-11-05 04:21:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:19 -0500
commit6d5757395a0e54245543794d0d6d6d6a32cd857a (patch)
treecdf48f97df8be03543172690524ddf6332a389a2 /source3/libsmb/clirap.c
parent65ed4d3efda243f526131fd145c72647785f9906 (diff)
downloadsamba-6d5757395a0e54245543794d0d6d6d6a32cd857a.tar.gz
samba-6d5757395a0e54245543794d0d6d6d6a32cd857a.tar.bz2
samba-6d5757395a0e54245543794d0d6d6d6a32cd857a.zip
r11511: A classic "friday night check-in" :-). This moves much
of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy. (This used to be commit 414303bc0272f207046b471a0364fa296b67c1f8)
Diffstat (limited to 'source3/libsmb/clirap.c')
-rw-r--r--source3/libsmb/clirap.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index 34f73cfafe..172dea4090 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -390,7 +390,7 @@ BOOL cli_qpathinfo(struct cli_state *cli, const char *fname,
char *rparam=NULL, *rdata=NULL;
int count=8;
BOOL ret;
- time_t (*date_fn)(void *);
+ time_t (*date_fn)(struct cli_state *, void *);
char *p;
p = param;
@@ -429,19 +429,19 @@ BOOL cli_qpathinfo(struct cli_state *cli, const char *fname,
}
if (cli->win95) {
- date_fn = make_unix_date;
+ date_fn = cli_make_unix_date;
} else {
- date_fn = make_unix_date2;
+ date_fn = cli_make_unix_date2;
}
if (c_time) {
- *c_time = date_fn(rdata+0);
+ *c_time = date_fn(cli, rdata+0);
}
if (a_time) {
- *a_time = date_fn(rdata+4);
+ *a_time = date_fn(cli, rdata+4);
}
if (m_time) {
- *m_time = date_fn(rdata+8);
+ *m_time = date_fn(cli, rdata+8);
}
if (size) {
*size = IVAL(rdata, 12);
@@ -471,7 +471,7 @@ BOOL cli_setpathinfo(struct cli_state *cli, const char *fname,
char *rparam=NULL, *rdata=NULL;
int count=8;
BOOL ret;
- void (*date_fn)(char *buf,int offset,time_t unixdate);
+ void (*date_fn)(struct cli_state *, char *buf,int offset,time_t unixdate);
char *p;
memset(param, 0, sizeof(param));
@@ -493,15 +493,15 @@ BOOL cli_setpathinfo(struct cli_state *cli, const char *fname,
p = data;
if (cli->win95) {
- date_fn = put_dos_date;
+ date_fn = cli_put_dos_date;
} else {
- date_fn = put_dos_date2;
+ date_fn = cli_put_dos_date2;
}
/* Add the create, last access, and modification times */
- (*date_fn)(p, 0, c_time);
- (*date_fn)(p, 4, a_time);
- (*date_fn)(p, 8, m_time);
+ (*date_fn)(cli, p, 0, c_time);
+ (*date_fn)(cli, p, 4, a_time);
+ (*date_fn)(cli, p, 8, m_time);
p += 12;
/* Skip DataSize and AllocationSize */