X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=afs.c;h=e1639cc7c1447e0e9f31deff65f79fab1e3239e3;hb=c88ccb7d91ea4baab78e24922d5c1d0cbaf6dcce;hp=a219c2dd1eb1b10744ee15381560fc7cd2fe3039;hpb=442a3320ff155d09b990c0ee2abace399cbcd6dd;p=paraslash.git diff --git a/afs.c b/afs.c index a219c2dd..e1639cc7 100644 --- a/afs.c +++ b/afs.c @@ -418,13 +418,13 @@ static int pass_afd(int fd, char *buf, size_t size) */ static int open_next_audio_file(void) { - struct audio_file_data afd; - int ret, shmid; + int ret, shmid, fd; char buf[8]; - ret = open_and_update_audio_file(&afd); + ret = open_and_update_audio_file(&fd); if (ret < 0) { - PARA_ERROR_LOG("%s\n", para_strerror(-ret)); + if (ret != -OSL_ERRNO_TO_PARA_ERROR(E_OSL_RB_KEY_NOT_FOUND)) + PARA_ERROR_LOG("%s\n", para_strerror(-ret)); goto no_admissible_files; } shmid = ret; @@ -434,8 +434,8 @@ static int open_next_audio_file(void) } *(uint32_t *)buf = NEXT_AUDIO_FILE; *(uint32_t *)(buf + 4) = (uint32_t)shmid; - ret = pass_afd(afd.fd, buf, 8); - close(afd.fd); + ret = pass_afd(fd, buf, 8); + close(fd); if (ret >= 0) return ret; destroy: @@ -659,7 +659,7 @@ static void get_database_dir(void) else { char *home = para_homedir(); database_dir = make_message( - "%s/.paraslash/afs_database-0.4", home); + "%s/.paraslash/afs_database-0.7", home); free(home); } }