-rw-r--r-- | library/alarmserver.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/library/alarmserver.cpp b/library/alarmserver.cpp index 7e6e515..5e4dd18 100644 --- a/library/alarmserver.cpp +++ b/library/alarmserver.cpp @@ -143,42 +143,33 @@ void AlarmServer::initialize() savefile.close(); if (!timerEventReceiver) timerEventReceiver = new TimerReceiverObject; setNearestTimerEvent(); } } static const char* atdir = "/var/spool/at/"; static bool triggerAtd( bool writeHWClock = FALSE ) { QFile trigger(QString(atdir) + "trigger"); if ( trigger.open(IO_WriteOnly|IO_Raw) ) { - - const char* data = -#ifdef QT_QWS_SHARP - //custom atd only writes HW Clock if we write a 'W' - ( writeHWClock ) ? "W\n" : -#endif - data = "\n"; - int len = strlen(data); - int total_written = trigger.writeBlock(data,len); - if ( total_written != len ) { + if ( trigger.writeBlock("\n",2) != 2 ) { QMessageBox::critical( 0, QObject::tr( "Out of Space" ), QObject::tr( "Unable to schedule alarm.\nFree some memory and try again." ) ); trigger.close(); QFile::remove( trigger.name() ); return FALSE; } return TRUE; } return FALSE; } void TimerReceiverObject::deleteTimer() { if ( !atfilename.isEmpty() ) { unlink( atfilename ); atfilename = QString::null; |