- On Linux systems, local sockets are now created in the
abstract name space by default. This allows to get rid of
the socket specials in /var/paraslash.
-
+ - New autoconf macros to avoid duplication in configure.ac.
++ - Status items (as shown by para_gui) are updated correctly
++ when the meta information of the current audio changes.
Download: ./releases/paraslash-git.tar.bz2 (tarball)
++
------------------------------------------
0.5.4 (2015-01-23) "exponential alignment"
------------------------------------------
AFTCOL_CHUNKS, &chunk_table_obj));
if (ret < 0)
return ret;
- ret = mmap_full_file(path, O_RDONLY, &map.data, &map.size, &afd->fd);
+ ret = mmap_full_file(d->path, O_RDONLY, &map.data, &map.size, &afd->fd);
if (ret < 0)
- goto err;
+ goto out;
hash_function(map.data, map.size, file_hash);
- ret = hash_compare(file_hash, aft_hash);
+ ret = hash_compare(file_hash, d->hash);
para_munmap(map.data, map.size);
if (ret) {
ret = -E_HASH_MISMATCH;
- goto err;
+ goto out;
}
- new_afsi = old_afsi;
+ new_afsi = d->afsi;
new_afsi.num_played++;
new_afsi.last_played = time(NULL);
save_afsi(&new_afsi, &afsi_obj); /* in-place update */
- afd->audio_format_id = old_afsi.audio_format_id;
+ afd->audio_format_id = d->afsi.audio_format_id;
load_chunk_table(&afd->afhi, chunk_table_obj.data);
- ret = make_status_items(afd, &old_afsi, path, score, file_hash);
- if (ret < 0)
- goto out;
- aced.aft_row = aft_row;
- aced.old_afsi = &old_afsi;
+ aced.aft_row = current_aft_row;
+ aced.old_afsi = &d->afsi;
+ /*
+ * No need to update the status items as the AFSI_CHANGE event will
+ * recreate them.
+ */
afs_event(AFSI_CHANGE, NULL, &aced);
ret = save_afd(afd);
-err:
+out:
free(afd->afhi.chunk_table);
osl_close_disk_object(&chunk_table_obj);
- if (ret < 0)
- PARA_ERROR_LOG("%s: %s\n", path, para_strerror(-ret));
+ if (ret < 0) {
+ PARA_ERROR_LOG("%s: %s\n", d->path, para_strerror(-ret));
+ ret = score_delete(current_aft_row);
+ if (ret >= 0)
+ goto again;
+ }
return ret;
}