]> git.tuebingen.mpg.de Git - paraslash.git/commit
aft: Remember current audio file after SIGHUP.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 16 Apr 2018 18:41:39 +0000 (20:41 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 6 May 2018 08:45:39 +0000 (10:45 +0200)
commit3cdcb449fc23f0bebe34343dc26b4e34b82175d5
tree7a2f8ad2813e1e3d75bd7cd0d1e42f3baa4fcde3
parent0f5a66770a6f43dd2c6bcb69601ec646d53b02f1
aft: Remember current audio file after SIGHUP.

The current_aft_row pointer becomes stale when the osl tables are
re-opened because SIGHUP has been received. If the current audio file
is renamed, or its metadate (afs info or afh info) are modified,
the table event dispatcher of the audio file table compares the
stale row pointer against the (non-stale) row pointer of the audio
file that has been obtained by path lookup. The two pointers never
compare equal under normal circumstances due to ASLR, so the file
modification does not trigger an update of the status items.

This patch fixes this inconvenience by remembering the hash of the
current audio file at table close time. On SIGHUP, after the table
has been re-opened, we lookup the stored hash to replace the stale
row pointer.
aft.c