mirror of
https://github.com/gigablast/open-source-search-engine.git
synced 2024-10-04 12:17:35 +03:00
fix some cores. fix debug log linkdb stuff.
This commit is contained in:
parent
a87b582145
commit
1eb9fdc658
18
Linkdb.cpp
18
Linkdb.cpp
@ -557,8 +557,9 @@ bool getLinkInfo ( SafeBuf *reqBuf ,
|
||||
req->m_ourHostHash32 = ourHostHash32;
|
||||
req->m_ourDomHash32 = ourDomHash32;
|
||||
|
||||
if ( g_conf.m_logDebugLinkInfo )
|
||||
req->m_printDebugMsgs = true;
|
||||
// why did i do this?
|
||||
// if ( g_conf.m_logDebugLinkInfo )
|
||||
// req->m_printDebugMsgs = true;
|
||||
|
||||
Url u;
|
||||
u.set ( req->ptr_url );
|
||||
@ -2426,7 +2427,10 @@ bool Msg25::gotLinkText ( Msg20Request *req ) { // LinkTextReply *linkText ) {
|
||||
struct tm *timeStruct = localtime ( &ttt );
|
||||
m_lastUpdateTime = ttt;
|
||||
char buf[64];
|
||||
strftime ( buf, 64 , "%b-%d-%Y(%H:%M:%S)" , timeStruct );
|
||||
if ( timeStruct )
|
||||
strftime ( buf, 64 , "%b-%d-%Y(%H:%M:%S)" , timeStruct );
|
||||
else
|
||||
sprintf(buf,"UNKNOWN time");
|
||||
|
||||
char *ss = "site";
|
||||
if ( m_mode == MODE_PAGELINKINFO ) ss = "page";
|
||||
@ -2845,8 +2849,12 @@ bool Msg25::gotLinkText ( Msg20Request *req ) { // LinkTextReply *linkText ) {
|
||||
time_t dd = (time_t)r->m_discoveryDate;
|
||||
if ( dd ) {
|
||||
struct tm *timeStruct = gmtime ( &dd );
|
||||
strftime ( discBuf, 128 , "<nobr>%b %d %Y</nobr>" ,
|
||||
timeStruct);
|
||||
if ( timeStruct )
|
||||
strftime ( discBuf, 128 ,
|
||||
"<nobr>%b %d %Y</nobr>" ,
|
||||
timeStruct);
|
||||
else
|
||||
sprintf(discBuf,"UNKNOWN DATE");
|
||||
}
|
||||
else
|
||||
sprintf(discBuf,"---");
|
||||
|
12
Loop.cpp
12
Loop.cpp
@ -903,8 +903,8 @@ bool Loop::init ( ) {
|
||||
if ( g_errno ) log("loop: sigaction SIGHUP: %s.", mstrerror(errno));
|
||||
if ( sigaction ( SIGTERM, &sa, 0 ) < 0 ) g_errno = errno;
|
||||
if ( g_errno ) log("loop: sigaction SIGTERM: %s.", mstrerror(errno));
|
||||
if ( sigaction ( SIGABRT, &sa, 0 ) < 0 ) g_errno = errno;
|
||||
if ( g_errno ) log("loop: sigaction SIGTERM: %s.", mstrerror(errno));
|
||||
// if ( sigaction ( SIGABRT, &sa, 0 ) < 0 ) g_errno = errno;
|
||||
// if ( g_errno ) log("loop: sigaction SIGTERM: %s.",mstrerror(errno));
|
||||
|
||||
// we should save our data on segv, sigill, sigfpe, sigbus
|
||||
sa.sa_sigaction = sigbadHandler;
|
||||
@ -916,10 +916,10 @@ bool Loop::init ( ) {
|
||||
if ( g_errno ) log("loop: sigaction SIGFPE: %s.", mstrerror(errno));
|
||||
if ( sigaction ( SIGBUS , &sa, 0 ) < 0 ) g_errno = errno;
|
||||
if ( g_errno ) log("loop: sigaction SIGBUS: %s.", mstrerror(errno));
|
||||
if ( sigaction ( SIGQUIT , &sa, 0 ) < 0 ) g_errno = errno;
|
||||
if ( g_errno ) log("loop: sigaction SIGBUS: %s.", mstrerror(errno));
|
||||
if ( sigaction ( SIGSYS , &sa, 0 ) < 0 ) g_errno = errno;
|
||||
if ( g_errno ) log("loop: sigaction SIGBUS: %s.", mstrerror(errno));
|
||||
// if ( sigaction ( SIGQUIT , &sa, 0 ) < 0 ) g_errno = errno;
|
||||
// if ( g_errno ) log("loop: sigaction SIGBUS: %s.", mstrerror(errno));
|
||||
// if ( sigaction ( SIGSYS , &sa, 0 ) < 0 ) g_errno = errno;
|
||||
// if ( g_errno ) log("loop: sigaction SIGBUS: %s.", mstrerror(errno));
|
||||
|
||||
|
||||
// if the UPS is about to go off it sends a SIGPWR
|
||||
|
Loading…
Reference in New Issue
Block a user