mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-16 02:46:08 -04:00
Add constness to XmlDoc::setStatus
This commit is contained in:
@ -2306,7 +2306,7 @@ bool printCrawlBotPage2 ( TcpSocket *socket ,
|
||||
// grab it
|
||||
SpiderRequest *oldsr = &xd->m_sreq;
|
||||
// get status
|
||||
char *status = xd->m_statusMsg;
|
||||
const char *status = xd->m_statusMsg;
|
||||
// show that
|
||||
if ( ! oldsr->printToTableSimple ( &sb , status,xd,j))
|
||||
return false;
|
||||
|
@ -263,7 +263,7 @@ int32_t SpiderReply::print ( SafeBuf *sbarg ) {
|
||||
|
||||
|
||||
|
||||
int32_t SpiderRequest::printToTable ( SafeBuf *sb , char *status ,
|
||||
int32_t SpiderRequest::printToTable ( SafeBuf *sb , const char *status ,
|
||||
XmlDoc *xd , int32_t row ) {
|
||||
|
||||
sb->safePrintf("<tr bgcolor=#%s>\n",LIGHT_BLUE);
|
||||
@ -401,7 +401,7 @@ int32_t SpiderRequest::printTableHeaderSimple ( SafeBuf *sb ,
|
||||
return sb->length();
|
||||
}
|
||||
|
||||
int32_t SpiderRequest::printToTableSimple ( SafeBuf *sb , char *status ,
|
||||
int32_t SpiderRequest::printToTableSimple ( SafeBuf *sb , const char *status ,
|
||||
XmlDoc *xd , int32_t row ) {
|
||||
|
||||
sb->safePrintf("<tr bgcolor=#%s>\n",LIGHT_BLUE);
|
||||
@ -1500,7 +1500,7 @@ bool sendPage ( State11 *st ) {
|
||||
// grab it
|
||||
SpiderRequest *oldsr = &xd->m_sreq;
|
||||
// get status
|
||||
char *status = xd->m_statusMsg;
|
||||
const char *status = xd->m_statusMsg;
|
||||
// show that
|
||||
if ( ! oldsr->printToTable ( &sb , status,xd,j) ) return false;
|
||||
// inc count
|
||||
|
4
Spider.h
4
Spider.h
@ -789,10 +789,10 @@ class SpiderRequest {
|
||||
|
||||
int32_t print( class SafeBuf *sb );
|
||||
|
||||
int32_t printToTable ( SafeBuf *sb , char *status ,
|
||||
int32_t printToTable ( SafeBuf *sb , const char *status ,
|
||||
class XmlDoc *xd , int32_t row ) ;
|
||||
// for diffbot...
|
||||
int32_t printToTableSimple ( SafeBuf *sb , char *status ,
|
||||
int32_t printToTableSimple ( SafeBuf *sb , const char *status ,
|
||||
class XmlDoc *xd , int32_t row ) ;
|
||||
static int32_t printTableHeader ( SafeBuf *sb , bool currentlSpidering ) ;
|
||||
static int32_t printTableHeaderSimple ( SafeBuf *sb ,
|
||||
|
@ -1290,10 +1290,10 @@ bool XmlDoc::setFirstUrl ( char *u , bool addWWW , Url *baseUrl ) {
|
||||
|
||||
|
||||
|
||||
void XmlDoc::setStatus ( char *s ) {
|
||||
void XmlDoc::setStatus ( const char *s ) {
|
||||
m_statusMsg = s;
|
||||
m_statusMsgValid = true;
|
||||
static char *s_last = NULL;
|
||||
static const char *s_last = NULL;
|
||||
|
||||
if ( s == s_last ) return;
|
||||
|
||||
|
4
XmlDoc.h
4
XmlDoc.h
@ -348,7 +348,7 @@ public:
|
||||
void nukeDoc ( class XmlDoc *);
|
||||
void reset ( ) ;
|
||||
bool setFirstUrl ( char *u , bool addWWW , Url *base = NULL ) ;
|
||||
void setStatus ( char *s ) ;
|
||||
void setStatus ( const char *s ) ;
|
||||
void setCallback ( void *state, void (*callback) (void *state) ) ;
|
||||
void setCallback ( void *state, bool (*callback) (void *state) ) ;
|
||||
void getRevisedSpiderRequest ( class SpiderRequest *revisedReq );
|
||||
@ -1043,7 +1043,7 @@ public:
|
||||
char m_isHijacked;
|
||||
|
||||
// stuff
|
||||
char *m_statusMsg;
|
||||
const char *m_statusMsg;
|
||||
Msg4 m_msg4;
|
||||
|
||||
bool m_deleteFromIndex;
|
||||
|
Reference in New Issue
Block a user