Skip to content

Commit

Permalink
good checkpoint. quite a few fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
gigablast committed Nov 18, 2014
1 parent df35b61 commit 931a1c4
Show file tree
Hide file tree
Showing 123 changed files with 654 additions and 536 deletions.
6 changes: 3 additions & 3 deletions Accessdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,15 +740,15 @@ void handleRequestaa ( UdpSlot *slot , int32_t niceness ) {
timestamp -= 7*86400*1000;
}

int64_t int32_tTime = 86400LL*365LL*1000LL*10; // 10 years in millisecs
int64_t longTime = 86400LL*365LL*1000LL*10; // 10 years in millisecs
// use the 2nd type of key... those have widgetid first and then
// the timestamp
key128_t startKey = g_accessdb.makeKey2 ( timestamp ,wgid );
key128_t endKey = g_accessdb.makeKey2 ( timestamp + int32_tTime, wgid);
key128_t endKey = g_accessdb.makeKey2 ( timestamp + longTime, wgid);
// widget id of 0 means ANY widget
if ( wgid == 0 ) {
startKey = g_accessdb.makeKey1(timestamp , 0 );
endKey = g_accessdb.makeKey1(timestamp + int32_tTime, 0 );
endKey = g_accessdb.makeKey1(timestamp + longTime, 0 );
}
// lookup accessdb records from that time going forward
if ( ! st->m_msg5.getList ( RDB_ACCESSDB ,
Expand Down
22 changes: 11 additions & 11 deletions Address.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3074,7 +3074,7 @@ bool Addresses::updateAddresses ( ) {
if ( d1 < -.01 ) continue;
if ( d2 < -.01 ) continue;
// . ok, they are the same i guess
// . prefer the one with the int32_test digits as the orig
// . prefer the one with the longest digits as the orig
// and the other as the alias
if ( ad->m_street->m_strlen > aj->m_street->m_strlen){
//aj->m_street->m_alias = ad;
Expand Down Expand Up @@ -4079,7 +4079,7 @@ bool setHashes ( Place *p , Words *ww , int32_t niceness ) {
// not a po box i guess
if ( k == -1 ) return true;

// xor it in aint32_t with h_po
// xor it in along with h_po
p->m_hash = h_po ^ wids[k];

return true;
Expand Down Expand Up @@ -5679,12 +5679,12 @@ bool Addresses::set2 ( ) {
Place *pp = NULL;
if ( ! pp ) pp = pc;
if ( ! pp ) pp = ps;
// . if tied prefer int32_ter. if length tied prefer state
// . if tied prefer longer. if length tied prefer state
// . "California" is both a state and a city
if ( pc && ps ) {
// kill state if city int32_ter
// kill state if city longer
if ( pc->m_alnumB > ps->m_alnumB ) ps = NULL;
// or kill city is state is int32_ter
// or kill city is state is longer
else if ( pc->m_alnumB < ps->m_alnumB ) pc = NULL;
}

Expand Down Expand Up @@ -7179,7 +7179,7 @@ bool Addresses::set2 ( ) {
// plays somewhat nicely with menu cruft because
// we have to verify the place names with another
// website to really make the place name stick,
// so let's no int32_ter use SEC_DUP or'ed in with
// so let's no longer use SEC_DUP or'ed in with
// the badFlags. mdw.
if ( sp && (sp[i]->m_flags & badFlags ) ) // |SEC_DUP)
continue;
Expand Down Expand Up @@ -10116,7 +10116,7 @@ int64_t *getSynonymWord ( int64_t *h, int64_t *prevId, bool isStreet ) {

int64_t *p = (int64_t *)s_syn.getValue64 ( *h );

// check city aliases table. we no int32_ter store city aliases
// check city aliases table. we no longer store city aliases
// in the synonym list
// . no! might have "SF Smith" not "Santa Fe Smith"
//if ( ! p ) {
Expand Down Expand Up @@ -12147,7 +12147,7 @@ bool Address::addToTagRec ( TagRec *gr , int32_t ip , int32_t timestamp ,
char *tagName ) {

//
// we are no int32_ter storing contact info addresses
// we are no longer storing contact info addresses
//
//return true;

Expand Down Expand Up @@ -12968,7 +12968,7 @@ void Address::printEssentials ( SafeBuf *pbuf , bool forEvents ,
pbuf->pushChar(';');
//if ( m_ctry->m_str )
// pbuf->javascriptEncode(m_ctry->m_str,m_ctry->m_strlen);
// now we include lat and int32_t, but only if we got both valid
// now we include lat and long, but only if we got both valid
if ( m_longitude != NO_LONGITUDE &&
m_latitude != NO_LONGITUDE ) {
pbuf->pushChar(';');
Expand Down Expand Up @@ -15839,7 +15839,7 @@ bool Addresses::hashForPlacedb ( int64_t docId ,
// no intersections
if ( a->m_street->m_flags2 & PLF2_INTERSECTION ) good = false;
// . skip if not good
// . we no int32_ter add non-inlined addresses cuz those are
// . we no longer add non-inlined addresses cuz those are
// not as accurate. many pages have the street address
// too far from the city and state, and we use one from the
// tag and it ain't right.
Expand Down Expand Up @@ -18934,7 +18934,7 @@ bool getLatLonFromUserInput ( float *radius,
cityA = city2A;
cityB = city2B;
}
// if both existed, prefer the int32_ter. if tied. prefer
// if both existed, prefer the longer. if tied. prefer
// the local one even if its population might be smaller
if ( crd && crd2 && city2B > cityB ) {
crd = crd2;
Expand Down
4 changes: 2 additions & 2 deletions AutoBan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ bool AutoBan::hasPerm(int32_t ip,
char c = banRegex[i];
// NULL terminate
banRegex[i] = '\0';
// search for substr (must be int32_ter than 2 chars
// search for substr (must be longer than 2 chars
if ( i - start > 2){
if (strnstr2(reqStr, reqLen, &banRegex[start]))
gotMatch = true;
Expand Down Expand Up @@ -1076,7 +1076,7 @@ bool AutoBan::printTable( TcpSocket *s , HttpRequest *r ) {
// ones to the conf parm;
if (banIps) {
//ack, the browser puts in crlf when this comes back, so
//we will have a int32_ter string here than the one we sent
//we will have a longer string here than the one we sent
//out. trim back all extrainious whitespace before we do
//bounds checking.
trimWhite(banIps);
Expand Down
2 changes: 1 addition & 1 deletion Bits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ bool Bits::set ( Words *words , char titleRecVersion , int32_t niceness ,


//
// pick the int32_test line in a hard section which ends in
// pick the longest line in a hard section which ends in
// a period and contains a br tag. then any line that
// is 80%+ of that line's number of chars is also a line
// where the br should not terminate it as a sentence.
Expand Down
2 changes: 1 addition & 1 deletion CatRec.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class CatRec {
char *getData ( ) { return m_data; };
int32_t getDataSize ( ) { return m_dataSize; };

// aint32_t with coll/collLen identifies a unique xml file
// along with coll/collLen identifies a unique xml file
//int32_t getFilenum ( ) { return m_filenum; };
//int32_t getRuleset ( ) { return m_filenum; };

Expand Down
2 changes: 1 addition & 1 deletion Catdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool Catdb::init ( ) {
return log("db: Catdb init failed.");

// . initialize our own internal rdb
// . i no int32_ter use cache so changes to tagdb are instant
// . i no longer use cache so changes to tagdb are instant
// . we still use page cache however, which is good enough!
//if ( this == &g_catdb )
if ( ! m_rdb.init ( g_hostdb.m_dir ,
Expand Down
2 changes: 1 addition & 1 deletion Clusterdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ static void clusterRmVfd ( DiskPageCache *pc,
// reset rdb
void Clusterdb::reset() { m_rdb.reset(); }

// . this no int32_ter maintains an rdb of cluster recs
// . this no longer maintains an rdb of cluster recs
// . Msg22 now just uses the cache to hold cluster recs that it computes
// from titlteRecs
// . clusterRecs are now just TitleRec keys...
Expand Down
2 changes: 1 addition & 1 deletion Clusterdb.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright Matt Wells, Jul 2002

// . a clusterRec now no int32_ter exists, per se
// . a clusterRec now no longer exists, per se
// . it is the same thing as the key of the titleRec in titledb
// . titleRecs now contain the site and content hashes in the low bits
// of their key.
Expand Down
10 changes: 5 additions & 5 deletions Collectiondb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ bool Collectiondb::addNewColl ( char *coll ,
// . scan for holes
// . i is also known as the collection id
//int32_t i = (int32_t)newCollnum;
// no int32_ter fill empty slots because if they do a reset then
// no longer fill empty slots because if they do a reset then
// a new rec right away it will be filled with msg4 recs not
// destined for it. Later we will have to recycle some how!!
//else for ( i = 0 ; i < m_numRecs ; i++ ) if ( ! m_recs[i] ) break;
Expand All @@ -348,7 +348,7 @@ bool Collectiondb::addNewColl ( char *coll ,
// return log("admin: Limit of %"INT64" collection reached. "
// "Collection not created.",maxColls);
//}
// if empty... bail, no int32_ter accepted, use "main"
// if empty... bail, no longer accepted, use "main"
if ( ! coll || !coll[0] ) {
g_errno = EBADENGINEER;
return log("admin: Trying to create a new collection "
Expand All @@ -359,7 +359,7 @@ bool Collectiondb::addNewColl ( char *coll ,
if ( gbstrlen(coll) > MAX_COLL_LEN ) {
g_errno = ENOBUFS;
return log("admin: Trying to create a new collection "
"whose name \"%s\" of %i chars is int32_ter than the "
"whose name \"%s\" of %i chars is longer than the "
"max of %"INT32" chars.",coll,gbstrlen(coll),
(int32_t)MAX_COLL_LEN);
}
Expand Down Expand Up @@ -1668,7 +1668,7 @@ CollectionRec::CollectionRec() {
//m_numAdminIps = 0;
memset ( m_bases , 0 , sizeof(RdbBase *)*RDB_END );
// how many keys in the tree of each rdb? we now store this stuff
// here and not in RdbTree.cpp because we no int32_ter have a maximum
// here and not in RdbTree.cpp because we no longer have a maximum
// # of collection recs... MAX_COLLS. each is a 32-bit "int32_t" so
// it is 4 * RDB_END...
memset ( m_numNegKeysInTree , 0 , 4*RDB_END );
Expand Down Expand Up @@ -3145,7 +3145,7 @@ bool CollectionRec::hasPermission ( char *p, int32_t plen , int32_t ip ) {
return true;

// scan the passwords
// MDW: no int32_ter, this is too vulnerable!!!
// MDW: no longer, this is too vulnerable!!!
/*
for ( int32_t i = 0 ; i < m_numAdminPwds ; i++ ) {
int32_t len = gbstrlen ( m_adminPwds[i] );
Expand Down
4 changes: 2 additions & 2 deletions Collectiondb.h
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ class CollectionRec {
//char m_newSpideringEnabled ;
char m_spideringEnabled ;
float m_newSpiderWeight ;
// m_inDeleteMode is no int32_ter used, just a place holder now
// m_inDeleteMode is no longer used, just a place holder now
//char m_inDeleteMode ;
//char m_restrictTitledbForQuery ; // obsoleted
//char m_recycleVotes ;
Expand Down Expand Up @@ -1058,7 +1058,7 @@ class CollectionRec {

//char m_orig [ MAX_PARMS ];

// we no int32_ter truncate termlists on disk, so this is obsolete
// we no longer truncate termlists on disk, so this is obsolete
//int32_t m_indexdbTruncationLimit;

// collection name in the other/external cluster from which we
Expand Down
2 changes: 1 addition & 1 deletion Conf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ char *Conf::getDefaultColl ( char *hostname, int32_t hostnameLen ) {
if ( cmpLen == 0 || cmpLen > hostnameLen )
continue;
// . check the hostname for a match
// this will allow hostname to be int32_ter to allow for
// this will allow hostname to be longer to allow for
// a possible port at the end
if ( strncmp ( hostname,
cmpHostname,
Expand Down
Loading

0 comments on commit 931a1c4

Please sign in to comment.