• Robert Anderson's avatar
    Use size values as kbyte instead of byte · 618b3a85
    Robert Anderson authored
    Convert bytes to kbytes on a new request
    Removed accounting bytes to kbytes conversion as the session value is used
    Updated UPGRADING file with details on how to modify the database to accommodate the changes to policyd
    NOTE: This commit will change the behaviour of message size counters used in policyd!
    The following changes will need to be made to your database:
    UPDATE quotas_limits, quotas_tracking
                    SET quotas_limits.CounterLimit = ceil(quotas_limits.CounterLimit / 1024),
                    quotas_tracking.Counter = ceil(quotas_tracking.Counter / 1024)
                    WHERE quotas_tracking.QuotasLimitsID = quotas_limits.ID
                    AND quotas_limits.Type = "MessageCumulativeSize";
    UPDATE session_tracking SET Size = ceil(Size / 1024);