Add constness to XmlDoc::setStatus

This commit is contained in:
Ai Lin Chia
2016-03-08 14:28:21 +01:00
parent a5422780cc
commit 8215b07788
5 changed files with 10 additions and 10 deletions

@ -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

@ -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;

@ -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;