1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

s3: fix order of arguments in nsec_time_diff call

This commit is contained in:
Björn Jacke 2010-09-17 13:47:05 +02:00
parent 311744a131
commit 10eefd85c9
2 changed files with 4 additions and 4 deletions

View File

@ -1119,7 +1119,7 @@ static int do_get(const char *rname, const char *lname_in, bool reget)
int this_time; int this_time;
clock_gettime_mono(&tp_end); clock_gettime_mono(&tp_end);
this_time = nsec_time_diff(&tp_start,&tp_end)/1000000; this_time = nsec_time_diff(&tp_end,&tp_start)/1000000;
get_total_time_ms += this_time; get_total_time_ms += this_time;
get_total_size += nread; get_total_size += nread;
@ -1768,7 +1768,7 @@ static int do_put(const char *rname, const char *lname, bool reput)
int this_time; int this_time;
clock_gettime_mono(&tp_end); clock_gettime_mono(&tp_end);
this_time = nsec_time_diff(&tp_start,&tp_end)/1000000; this_time = nsec_time_diff(&tp_end,&tp_start)/1000000;
put_total_time_ms += this_time; put_total_time_ms += this_time;
put_total_size += state.nread; put_total_size += state.nread;

View File

@ -307,7 +307,7 @@ NODE_STATUS_STRUCT *node_status_query(int fd,
while (1) { while (1) {
struct timespec tp2; struct timespec tp2;
clock_gettime_mono(&tp2); clock_gettime_mono(&tp2);
if (nsec_time_diff(&tp,&tp2)/1000000 > retry_time) { if (nsec_time_diff(&tp2,&tp)/1000000 > retry_time) {
if (!retries) if (!retries)
break; break;
if (!found && !send_packet(&p)) if (!found && !send_packet(&p))
@ -716,7 +716,7 @@ struct sockaddr_storage *name_query(int fd,
struct timespec tp2; struct timespec tp2;
clock_gettime_mono(&tp2); clock_gettime_mono(&tp2);
if (nsec_time_diff(&tp,&tp2)/1000000 > retry_time) { if (nsec_time_diff(&tp2,&tp)/1000000 > retry_time) {
if (!retries) if (!retries)
break; break;
if (!found && !send_packet(&p)) if (!found && !send_packet(&p))