Changeset 2583

Show
Ignore:
Timestamp:
11/19/2011 06:22:41 PM (18 months ago)
Author:
dburgess
Message:

Brining A3/A8 into the sipauthserve public release.

Files:
4 added
5 modified

Legend:

Unmodified
Added
Removed
  • CommonLibs/trunk/Logger.cpp

    r2254 r2583  
    151151Log::~Log() 
    152152{ 
     153        if (mDummyInit) return; 
    153154        // Anything at or above LOG_CRIT is an "alarm". 
    154155        // Save alarms in the local list and echo them to stderr. 
     
    160161        // So just log. 
    161162        syslog(mPriority, "%s", mStream.str().c_str()); 
     163} 
     164 
     165 
     166Log::Log(const char* name, const char* level, int facility) 
     167{ 
     168        mDummyInit = true; 
     169        gLogInit(name, level, facility); 
    162170} 
    163171 
  • CommonLibs/trunk/Logger.h

    r2254 r2583  
    4141        Log(LOG_##level).get() << pthread_self() \ 
    4242        << " " __FILE__  ":"  << __LINE__ << ":" << __FUNCTION__ << ": " 
     43 
     44#ifdef NDEBUG 
     45#define LOG(wLevel) \ 
     46        if (LOG_##wLevel!=LOG_DEBUG && gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) 
     47#else 
    4348#define LOG(wLevel) \ 
    4449        if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) 
     50#endif 
     51 
     52 
    4553#define OBJLOG(wLevel) \ 
    46         if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) << "obj: " << this << ' ' 
     54        LOG(wLevel) << "obj: " << this << ' ' 
    4755 
    4856#define LOG_ASSERT(x) { if (!(x)) LOG(EMERG) << "assertion " #x " failed"; } assert(x); 
     
    6775        std::ostringstream mStream;             ///< This is where we buffer up the log entry. 
    6876        int mPriority;                                  ///< Priority of current repot. 
     77        bool mDummyInit; 
    6978 
    7079        public: 
    7180 
    7281        Log(int wPriority) 
    73                 :mPriority(wPriority) 
     82                :mPriority(wPriority), mDummyInit(false) 
    7483        { } 
     84 
     85        Log(const char* name, const char* level=NULL, int facility=LOG_USER); 
    7586 
    7687        // Most of the work is in the desctructor. 
  • openbts/trunk/CommonLibs/Logger.cpp

    r2242 r2583  
    151151Log::~Log() 
    152152{ 
     153        if (mDummyInit) return; 
    153154        // Anything at or above LOG_CRIT is an "alarm". 
    154155        // Save alarms in the local list and echo them to stderr. 
     
    160161        // So just log. 
    161162        syslog(mPriority, "%s", mStream.str().c_str()); 
     163} 
     164 
     165 
     166Log::Log(const char* name, const char* level, int facility) 
     167{ 
     168        mDummyInit = true; 
     169        gLogInit(name, level, facility); 
    162170} 
    163171 
  • openbts/trunk/CommonLibs/Logger.h

    r2242 r2583  
    4141        Log(LOG_##level).get() << pthread_self() \ 
    4242        << " " __FILE__  ":"  << __LINE__ << ":" << __FUNCTION__ << ": " 
     43 
     44#ifdef NDEBUG 
     45#define LOG(wLevel) \ 
     46        if (LOG_##wLevel!=LOG_DEBUG && gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) 
     47#else 
    4348#define LOG(wLevel) \ 
    4449        if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) 
     50#endif 
     51 
     52 
    4553#define OBJLOG(wLevel) \ 
    46         if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) << "obj: " << this << ' ' 
     54        LOG(wLevel) << "obj: " << this << ' ' 
    4755 
    4856#define LOG_ASSERT(x) { if (!(x)) LOG(EMERG) << "assertion " #x " failed"; } assert(x); 
     
    6775        std::ostringstream mStream;             ///< This is where we buffer up the log entry. 
    6876        int mPriority;                                  ///< Priority of current repot. 
     77        bool mDummyInit; 
    6978 
    7079        public: 
    7180 
    7281        Log(int wPriority) 
    73                 :mPriority(wPriority) 
     82                :mPriority(wPriority), mDummyInit(false) 
    7483        { } 
     84 
     85        Log(const char* name, const char* level=NULL, int facility=LOG_USER); 
    7586 
    7687        // Most of the work is in the desctructor. 
  • subscriberRegistry/trunk/SubscriberRegistry.cpp

    r2243 r2583  
    145145                "ki                    varchar(33) default '', " 
    146146                "kc                    varchar(33) default '', " 
    147                 "prepaid               int(1) DEFAULT 0 not null, " 
    148                 "secondsRemaining      int(11) DEFAULT 0 not null, " 
    149147                "RRLPSupported         int(1) default 1 not null, " 
    150148                "regTime               INTEGER default 0 NOT NULL, " // Unix time of most recent registration