summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-13 20:43:10 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-13 21:53:07 +0200
commit7ba2bc35a3bb40260347cf6001aab1726a7cde6e (patch)
tree50fc5b95c0d64555e0ecafa14ca30aa6e9c4ffa7
parentd62f1e1e19965808faa148addc813f08eea3ccc6 (diff)
downloadsamba-7ba2bc35a3bb40260347cf6001aab1726a7cde6e.tar.gz
samba-7ba2bc35a3bb40260347cf6001aab1726a7cde6e.tar.bz2
samba-7ba2bc35a3bb40260347cf6001aab1726a7cde6e.zip
s3:libsmb: make use of cli_state_server_time_zone()
metze
-rw-r--r--source3/libsmb/clifile.c12
-rw-r--r--source3/libsmb/clilist.c14
-rw-r--r--source3/libsmb/cliprint.c2
-rw-r--r--source3/libsmb/clirap.c6
4 files changed, 17 insertions, 17 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 2a30d2cda9..b418049d32 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -3190,7 +3190,7 @@ struct tevent_req *cli_getattrE_send(TALLOC_CTX *mem_ctx,
return NULL;
}
- state->zone_offset = cli->serverzone;
+ state->zone_offset = cli_state_server_time_zone(cli);
SSVAL(state->vwv+0,0,fnum);
subreq = cli_smb_send(state, ev, cli, SMBgetattrE, additional_flags,
@@ -3339,7 +3339,7 @@ struct tevent_req *cli_getatr_send(TALLOC_CTX *mem_ctx,
return NULL;
}
- state->zone_offset = cli->serverzone;
+ state->zone_offset = cli_state_server_time_zone(cli);
bytes = talloc_array(state, uint8_t, 1);
if (tevent_req_nomem(bytes, req)) {
@@ -3486,11 +3486,11 @@ struct tevent_req *cli_setattrE_send(TALLOC_CTX *mem_ctx,
SSVAL(state->vwv+0, 0, fnum);
push_dos_date2((uint8_t *)&state->vwv[1], 0, change_time,
- cli->serverzone);
+ cli_state_server_time_zone(cli));
push_dos_date2((uint8_t *)&state->vwv[3], 0, access_time,
- cli->serverzone);
+ cli_state_server_time_zone(cli));
push_dos_date2((uint8_t *)&state->vwv[5], 0, write_time,
- cli->serverzone);
+ cli_state_server_time_zone(cli));
subreq = cli_smb_send(state, ev, cli, SMBsetattrE, additional_flags,
7, state->vwv, 0, NULL);
@@ -3597,7 +3597,7 @@ struct tevent_req *cli_setatr_send(TALLOC_CTX *mem_ctx,
}
SSVAL(state->vwv+0, 0, attr);
- push_dos_date3((uint8_t *)&state->vwv[1], 0, mtime, cli->serverzone);
+ push_dos_date3((uint8_t *)&state->vwv[1], 0, mtime, cli_state_server_time_zone(cli));
bytes = talloc_array(state, uint8_t, 1);
if (tevent_req_nomem(bytes, req)) {
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index 521afc9aba..5118f9f377 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -77,11 +77,11 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
return pdata_end - base;
}
finfo->ctime_ts = convert_time_t_to_timespec(
- make_unix_date2(p+4, cli->serverzone));
+ make_unix_date2(p+4, cli_state_server_time_zone(cli)));
finfo->atime_ts = convert_time_t_to_timespec(
- make_unix_date2(p+8, cli->serverzone));
+ make_unix_date2(p+8, cli_state_server_time_zone(cli)));
finfo->mtime_ts = convert_time_t_to_timespec(
- make_unix_date2(p+12, cli->serverzone));
+ make_unix_date2(p+12, cli_state_server_time_zone(cli)));
finfo->size = IVAL(p,16);
finfo->mode = CVAL(p,24);
len = CVAL(p, 26);
@@ -126,11 +126,11 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
return pdata_end - base;
}
finfo->ctime_ts = convert_time_t_to_timespec(
- make_unix_date2(p+4, cli->serverzone));
+ make_unix_date2(p+4, cli_state_server_time_zone(cli)));
finfo->atime_ts = convert_time_t_to_timespec(
- make_unix_date2(p+8, cli->serverzone));
+ make_unix_date2(p+8, cli_state_server_time_zone(cli)));
finfo->mtime_ts = convert_time_t_to_timespec(
- make_unix_date2(p+12, cli->serverzone));
+ make_unix_date2(p+12, cli_state_server_time_zone(cli)));
finfo->size = IVAL(p,16);
finfo->mode = CVAL(p,24);
len = CVAL(p, 30);
@@ -248,7 +248,7 @@ static bool interpret_short_filename(TALLOC_CTX *ctx,
finfo->mode = CVAL(p,21);
/* this date is converted to GMT by make_unix_date */
- finfo->ctime_ts.tv_sec = make_unix_date(p+22, cli->serverzone);
+ finfo->ctime_ts.tv_sec = make_unix_date(p+22, cli_state_server_time_zone(cli));
finfo->ctime_ts.tv_nsec = 0;
finfo->mtime_ts.tv_sec = finfo->atime_ts.tv_sec = finfo->ctime_ts.tv_sec;
finfo->mtime_ts.tv_nsec = finfo->atime_ts.tv_nsec = 0;
diff --git a/source3/libsmb/cliprint.c b/source3/libsmb/cliprint.c
index 06cb02521f..f34b3e971b 100644
--- a/source3/libsmb/cliprint.c
+++ b/source3/libsmb/cliprint.c
@@ -101,7 +101,7 @@ int cli_print_queue(struct cli_state *cli,
fix_char_ptr(SVAL(p,4), converter,
rdata, rdrcnt));
job.t = make_unix_date3(
- p + 12, cli->serverzone);
+ p + 12, cli_state_server_time_zone(cli));
job.size = IVAL(p,16);
fstrcpy(job.name,fix_char_ptr(SVAL(p,24),
converter,
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index 8e7dc68534..b20d089382 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -640,13 +640,13 @@ NTSTATUS cli_qpathinfo1_recv(struct tevent_req *req,
}
if (change_time) {
- *change_time = date_fn(state->data+0, state->cli->serverzone);
+ *change_time = date_fn(state->data+0, cli_state_server_time_zone(state->cli));
}
if (access_time) {
- *access_time = date_fn(state->data+4, state->cli->serverzone);
+ *access_time = date_fn(state->data+4, cli_state_server_time_zone(state->cli));
}
if (write_time) {
- *write_time = date_fn(state->data+8, state->cli->serverzone);
+ *write_time = date_fn(state->data+8, cli_state_server_time_zone(state->cli));
}
if (size) {
*size = IVAL(state->data, 12);