mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
Merge pull request #319 from LemonBoy/awaylog-flush
Flush the dirty buffer to disk
This commit is contained in:
commit
bd696a096e
1 changed files with 6 additions and 0 deletions
|
|
@ -62,6 +62,9 @@ static void awaylog_open(void)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Flush the dirty buffers to disk before acquiring the file position */
|
||||
write_buffer_flush();
|
||||
|
||||
awaylog = log;
|
||||
away_filepos = lseek(log->handle, 0, SEEK_CUR);
|
||||
away_msgs = 0;
|
||||
|
|
@ -83,6 +86,9 @@ static void awaylog_close(void)
|
|||
|
||||
if (awaylog == log) awaylog = NULL;
|
||||
|
||||
/* Flush the dirty buffers to disk before showing the away log */
|
||||
write_buffer_flush();
|
||||
|
||||
signal_emit("awaylog show", 3, log, GINT_TO_POINTER(away_msgs),
|
||||
GINT_TO_POINTER(away_filepos));
|
||||
log_close(log);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue