s3: fix order of arguments in nsec_time_diff call
authorBjörn Jacke <bj@sernet.de>
Fri, 17 Sep 2010 11:47:05 +0000 (13:47 +0200)
committerBjörn Jacke <bj@sernet.de>
Fri, 17 Sep 2010 11:49:11 +0000 (13:49 +0200)
source3/client/client.c
source3/libsmb/namequery.c

index cb9ba24e161407480a24709baf3d7e1fd7002815..86d64f6afa539b9d54fe2d85e3b03a001ba39abc 100644 (file)
@@ -1119,7 +1119,7 @@ static int do_get(const char *rname, const char *lname_in, bool reget)
                int this_time;
 
                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_size += nread;
 
@@ -1768,7 +1768,7 @@ static int do_put(const char *rname, const char *lname, bool reput)
                int this_time;
 
                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_size += state.nread;
 
index 00a3b97a98d9267d9fe9af285eb016679e2cec08..d1fb5ab81792fa7b75988bcf291f8668d01a54b8 100644 (file)
@@ -307,7 +307,7 @@ NODE_STATUS_STRUCT *node_status_query(int fd,
        while (1) {
                struct timespec 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)
                                break;
                        if (!found && !send_packet(&p))
@@ -716,7 +716,7 @@ struct sockaddr_storage *name_query(int fd,
                struct timespec 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)
                                break;
                        if (!found && !send_packet(&p))