s3: Move "trans_num" to smbd_server_connection
authorVolker Lendecke <vl@samba.org>
Tue, 24 Aug 2010 18:47:29 +0000 (20:47 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 24 Aug 2010 19:06:41 +0000 (21:06 +0200)
source3/smbd/globals.c
source3/smbd/globals.h
source3/smbd/process.c

index 324d13a23941ec06c859d26837f01f89b73f1633..98e4d51b088b7bf23e36c62daf08464724eb8d8a 100644 (file)
@@ -71,7 +71,6 @@ struct msg_state *smbd_msg_state = NULL;
 
 bool logged_ioctl_message = false;
 
-int trans_num = 0;
 pid_t mypid = 0;
 time_t last_smb_conf_reload_time = 0;
 time_t last_printer_reload_time = 0;
index e4f4b790585d2bab798c1b21f078faed48668d1a..86e2c9b3f91480c83e4be1c80374debea99793d7 100644 (file)
@@ -466,6 +466,7 @@ struct smbd_server_connection {
                bool got_session;
        } nbt;
        bool using_smb2;
+       int trans_num;
        struct {
                struct fd_event *fde;
 
index b787674635a04ba7d4a556991a8873e3b5d3babd..961598f8fd79ffafb6051fed29e33a9ff51684ae 100644 (file)
@@ -1647,9 +1647,8 @@ static void process_smb(struct smbd_server_connection *conn,
 
        DEBUG( 6, ( "got message type 0x%x of len 0x%x\n", msg_type,
                    smb_len(inbuf) ) );
-       DEBUG( 3, ( "Transaction %d of length %d (%u toread)\n", trans_num,
-                               (int)nread,
-                               (unsigned int)unread_bytes ));
+       DEBUG(3, ("Transaction %d of length %d (%u toread)\n",
+                 conn->trans_num, (int)nread, (unsigned int)unread_bytes));
 
        if (msg_type != 0) {
                /*
@@ -1676,7 +1675,7 @@ static void process_smb(struct smbd_server_connection *conn,
        show_msg((char *)inbuf);
 
        construct_reply((char *)inbuf,nread,unread_bytes,seqnum,encrypted,deferred_pcd);
-       trans_num++;
+       conn->trans_num++;
 
 done:
        conn->smb1.num_requests++;