Changeset 1154 for trunk/pdns/modules/opendbxbackend/odbxprivate.cc
- Timestamp:
- 03/09/08 16:31:37 (2 years ago)
- Files:
-
- 1 modified
-
trunk/pdns/modules/opendbxbackend/odbxprivate.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/modules/opendbxbackend/odbxprivate.cc
r1024 r1154 19 19 odbx_finish( m_handle[type] ); 20 20 m_handle[type] = NULL; 21 } 22 23 if( type == WRITE && getArg( "backend" ) == "sqlite" ) 24 { 25 L.log( m_myname + " Using same SQLite connection for reading and writeing to '" + hosts[odbx_host_index[READ]] + "'", Logger::Notice ); 26 m_handle[WRITE] = m_handle[READ]; 27 return true; 21 28 } 22 29 … … 157 164 158 165 159 bool OdbxBackend::getDomainList( const string& stmt, vector<DomainInfo>* list, bool (*check_fcn)(u _int32_t,u_int32_t,SOAData*,DomainInfo*) )166 bool OdbxBackend::getDomainList( const string& stmt, vector<DomainInfo>* list, bool (*check_fcn)(uint32_t,uint32_t,SOAData*,DomainInfo*) ) 160 167 { 161 168 const char* tmp; 162 u _int32_t nlast, nserial;169 uint32_t nlast, nserial; 163 170 DomainInfo di; 164 171 SOAData sd; … … 189 196 if( ( tmp = odbx_field_value( m_result, 4 ) ) != NULL ) 190 197 { 198 nserial = strtol( tmp, NULL, 10 ); 199 } 200 201 if( ( tmp = odbx_field_value( m_result, 3 ) ) != NULL ) 202 { 191 203 nlast = strtol( tmp, NULL, 10 ); 192 }193 194 if( ( tmp = odbx_field_value( m_result, 3 ) ) != NULL )195 {196 nserial = strtol( tmp, NULL, 10 );197 204 } 198 205 … … 229 236 230 237 231 bool checkSlave( u _int32_t nlast, u_int32_t nserial, SOAData* sd, DomainInfo* di )232 { 233 if( nlast + sd->refresh < (u _int32_t) time( 0 ) )238 bool checkSlave( uint32_t nlast, uint32_t nserial, SOAData* sd, DomainInfo* di ) 239 { 240 if( nlast + sd->refresh < (uint32_t) time( 0 ) ) 234 241 { 235 242 di->kind = DomainInfo::Slave; … … 242 249 243 250 244 bool checkMaster( u _int32_t nlast, u_int32_t nserial, SOAData* sd, DomainInfo* di )251 bool checkMaster( uint32_t nlast, uint32_t nserial, SOAData* sd, DomainInfo* di ) 245 252 { 246 253 if( nserial != sd->serial )