crossroads

Git mirror of https://crossroads.e-tunity.com/
git clone git://git.finwo.net/app/crossroads
Log | Files | Refs | LICENSE

activity.cc (391B)


      1 #include "ipstore"
      2 
      3 void IPStore::activity(struct in_addr clientip, unsigned curbackend) {
      4     if (!onoff)
      5 	return;
      6 
      7     msg("Logging activity for back end " << curbackend << 
      8 	" from " << inet2string(clientip) << '\n');
      9 
     10     int lock;
     11     
     12     mutex_lock(&lock);
     13     store[clientip].targetbackend = (int)curbackend;
     14     store[clientip].lastaccess = time(0);
     15     mutex_unlock(&lock);
     16 }
     17