diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -90,7 +90,7 @@ int main( int argc, char **argv ) if ( config.dpmsTimeout > 0 && config.dpmsTimeout < defaultSleep ) { defaultSleep = config.dpmsTimeout; } - int listenFd = rpcOpen(); + int listenFd = rpc_open(); if ( listenFd == -1 ) return 1; lastActivity = now(); @@ -190,11 +190,11 @@ int main( int argc, char **argv ) if ( remaining <= 2 ) { killSession( usr ); } else if ( remaining <= 65 ) { - warnUser( usr, WARN_LOGOUT, remaining ); + warn_showDefaultWarning( usr, WARN_LOGOUT, remaining ); CAP_SLEEP( remaining ); } else if ( remaining < 310 ) { if ( remaining % 30 < 10 ) { - warnUser( usr, WARN_LOGOUT_LOW, remaining ); + warn_showDefaultWarning( usr, WARN_LOGOUT_LOW, remaining ); } CAP_SLEEP( remaining - ( ( remaining - 30 ) / 60 * 60 + 2 ) ); } else { @@ -274,7 +274,7 @@ int main( int argc, char **argv ) w = WARN_POWEROFF; } for ( idx = 0; idx < count; ++idx ) { - warnUser( &users[idx], w, remaining ); + warn_showDefaultWarning( &users[idx], w, remaining ); } } CAP_SLEEP( remaining - ( ( remaining - 30 ) / 60 * 60 + 2 ) ); @@ -286,7 +286,7 @@ int main( int argc, char **argv ) do { const time_t oldDeadline = nextAction.deadline; // Handle requests - rpcHandle( listenFd ); + rpc_handle( listenFd ); // Might have set a new scheduled action if ( nextAction.deadline != oldDeadline ) { int delta = nextAction.deadline - monoNOW; @@ -294,7 +294,7 @@ int main( int argc, char **argv ) } // Sleep until next run //printf( "Sleeping %d seconds\n ", sleepTime ); - rpcWait( listenFd, sleepTime > 5 ? sleepTime : 5 ); + rpc_wait( listenFd, sleepTime > 5 ? sleepTime : 5 ); // Detect time changes endWall = time( NULL ); endMono = now(); @@ -561,7 +561,7 @@ void main_queueAction( enum Shutdown action, int delta ) void main_warnAll( const char *message ) { for ( int idx = 0; idx < userCount; ++idx ) { - showWarning( &users[idx], "Warning", message ); + warn_showCustomWarning( &users[idx], "Warning", message ); } } |