|
|
@ -115,6 +115,16 @@ mojoKernel::~mojoKernel(){ |
|
|
// LOG( "BopBop!" );
|
|
|
// LOG( "BopBop!" );
|
|
|
// SLEEP(1000);
|
|
|
// SLEEP(1000);
|
|
|
//};
|
|
|
//};
|
|
|
|
|
|
#ifdef LINUX_KERNEL_WATCHDOG
|
|
|
|
|
|
LOG("Disable WD!"); |
|
|
|
|
|
if( m_iWatchdogFd > -1 ) { |
|
|
|
|
|
char tB[64]; |
|
|
|
|
|
sprintf( tB, "-1\n" ); |
|
|
|
|
|
//ToDo: Make Error Handling here!
|
|
|
|
|
|
write( m_iWatchdogFd, &tB, strlen( tB ) ); |
|
|
|
|
|
}; |
|
|
|
|
|
LOG("WatchDog turned Off!"); |
|
|
|
|
|
#endif
|
|
|
_instance = NULL; |
|
|
_instance = NULL; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
@ -327,22 +337,9 @@ void mojoKernel::m_fThreadProc( void ){ |
|
|
#ifdef LINUX_KERNEL_WATCHDOG
|
|
|
#ifdef LINUX_KERNEL_WATCHDOG
|
|
|
if( m_iWatchdogFd > -1 ) { |
|
|
if( m_iWatchdogFd > -1 ) { |
|
|
char tB[64]; |
|
|
char tB[64]; |
|
|
char ttB[128]; |
|
|
|
|
|
sprintf( tB, "2000\n" ); |
|
|
sprintf( tB, "2000\n" ); |
|
|
//int ret = xioctl( m_iWatchdogFd, WDIOC_KEEPALIVE, NULL );
|
|
|
|
|
|
//if( ret < 0 ){
|
|
|
|
|
|
// char tB[200];
|
|
|
|
|
|
// sprintf( tB, "Could not pat watchdog: %s\n", strerror(errno));
|
|
|
|
|
|
// LOG_ERROR( tB );
|
|
|
|
|
|
//};
|
|
|
|
|
|
//LOG("Write WD!");
|
|
|
|
|
|
//ToDo: Make Error Handling here!
|
|
|
//ToDo: Make Error Handling here!
|
|
|
write( m_iWatchdogFd, &tB, strlen( tB ) ); |
|
|
write( m_iWatchdogFd, &tB, strlen( tB ) ); |
|
|
//LOG("Read WD!");
|
|
|
|
|
|
//read( m_iWatchdogFd, &tB, 64 );
|
|
|
|
|
|
//LOG("Done WD!");
|
|
|
|
|
|
//sprintf( ttB, "Client: I recieved %s from server!", tB );
|
|
|
|
|
|
//LOG( ttB );
|
|
|
|
|
|
}; |
|
|
}; |
|
|
#endif
|
|
|
#endif
|
|
|
m_bDebugMode = m_pDBC->getAppDebugMode(); |
|
|
m_bDebugMode = m_pDBC->getAppDebugMode(); |
|
|
|