]> git.stg.codes - stg.git/commitdiff
Added modification time for session traffic.
authorMaxim Mamontov <faust.madf@gmail.com>
Fri, 20 Jun 2014 22:11:25 +0000 (01:11 +0300)
committerMaxim Mamontov <faust.madf@gmail.com>
Fri, 20 Jun 2014 22:11:25 +0000 (01:11 +0300)
include/stg/user.h
projects/stargazer/user_impl.cpp
projects/stargazer/user_impl.h

index 8dc761e35acfb21932c97676faf1cd4dde379915..7772a298986fadc6320e203f87103f9a48437a70 100644 (file)
@@ -70,6 +70,8 @@ public:
 
     virtual const DIR_TRAFF &   GetSessionUpload() const = 0;
     virtual const DIR_TRAFF &   GetSessionDownload() const = 0;
+    virtual time_t              GetSessionUploadModificationTime() const = 0;
+    virtual time_t              GetSessionDownloadModificationTime() const = 0;
 
     virtual bool                GetConnected() const = 0;
     virtual time_t              GetConnectedModificationTime() const = 0;
index 22afa7f87460c24432f0384c77d122e24f0a9078..2b60c9adaab9e2c89c988b6bb53a1a3b5b26e28f 100644 (file)
@@ -690,6 +690,8 @@ DIR_TRAFF zeroSesssion;
 
 sessionUpload = zeroSesssion;
 sessionDownload = zeroSesssion;
+sessionUploadModTime = stgTime;
+sessionDownloadModTime = stgTime;
 }
 //-----------------------------------------------------------------------------
 void USER_IMPL::PrintUser() const
@@ -895,6 +897,7 @@ if (tt == TRAFF_UP ||
 
 up = dt;
 sessionUpload[dir] += len;
+sessionUploadModTime = stgTime;
 
 //Add detailed stat
 
@@ -986,6 +989,7 @@ if (tt == TRAFF_DOWN ||
 
 down = dt;
 sessionDownload[dir] += len;
+sessionDownloadModTime = stgTime;
 
 //Add detailed stat
 
index 5b51fc5d040f4441c80d2b2ef124e5efe6c19d6d..29cc63c4f57b12522e8df7189ba2d623366f02f4 100644 (file)
@@ -181,6 +181,8 @@ public:
 
     const DIR_TRAFF & GetSessionUpload() const { return sessionUpload; }
     const DIR_TRAFF & GetSessionDownload() const { return sessionDownload; }
+    time_t GetSessionUploadModificationTime() const { return sessionUploadModTime; }
+    time_t GetSessionDownloadModificationTime() const { return sessionDownloadModTime; }
 
     bool            GetConnected() const { return connected; }
     time_t          GetConnectedModificationTime() const { return connected.ModificationTime(); }
@@ -325,6 +327,8 @@ private:
 
     DIR_TRAFF                sessionUpload;
     DIR_TRAFF                sessionDownload;
+    time_t                   sessionUploadModTime;
+    time_t                   sessionDownloadModTime;
 
     CHG_PASSIVE_NOTIFIER     passiveNotifier;
     CHG_DISABLED_NOTIFIER    disabledNotifier;