]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aft.c
Kill duplicate audio format status item.
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index e45938d3942619989cc6eecbc9f29e986d3f5f30..df8774aae277bc3c2ead443432da69ace94d6d14 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -673,7 +673,7 @@ int open_and_update_audio_file(struct osl_row *aft_row, struct audio_file_data *
        int ret = get_hash_of_row(aft_row, &aft_hash);
        struct afsi_change_event_data aced;
        struct osl_object map, chunk_table_obj;
-       char *tmp, *path;
+       char *path;
 
        if (ret < 0)
                return ret;
@@ -714,14 +714,6 @@ int open_and_update_audio_file(struct osl_row *aft_row, struct audio_file_data *
        ret = load_chunk_info(&chunk_table_obj, &afd->afhi);
        if (ret < 0)
                goto err;
-       ret = get_attribute_text(&afd->afsi.attributes, " ", &tmp);
-       if (ret < 0)
-               goto err;
-       assert(tmp);
-       strncpy(afd->attributes_string, tmp, sizeof(afd->attributes_string));
-       afd->attributes_string[sizeof(afd->attributes_string) - 1] = '\0';
-       free(tmp);
-
        {
                struct ls_data d = {
                        .afhi = afd->afhi,
@@ -735,7 +727,7 @@ int open_and_update_audio_file(struct osl_row *aft_row, struct audio_file_data *
                if (ret < 0)
                        goto err;
                strncpy(afd->afs_status_info, pb.buf, AFS_STATUS_INFO_SIZE);
-               afd->afs_status_info[AFS_STATUS_INFO_SIZE] = '\0';
+               afd->afs_status_info[AFS_STATUS_INFO_SIZE - 1] = '\0';
                free(pb.buf);
        }
        aced.aft_row = aft_row;