X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=afs.c;h=64d3b0f82fb9005b9e526d7ff3265640d3777114;hp=d9461bb7617aaca1c56b7709c6326e0924966562;hb=6a0876b8ebae7ff007617e9c9a4e0e72744cfa23;hpb=1023721b3a7bf7f642b3e4d034c2314a3dc7becb diff --git a/afs.c b/afs.c index d9461bb7..64d3b0f8 100644 --- a/afs.c +++ b/afs.c @@ -75,6 +75,7 @@ struct command_task { struct task task; }; +extern int mmd_mutex; extern struct misc_meta_data *mmd; static int server_socket; @@ -571,15 +572,15 @@ static int activate_mood_or_playlist(char *arg, int *num_admissible) free(current_mop); if (arg) { current_mop = para_strdup(arg); - mmd_lock(); + mutex_lock(mmd_mutex); strncpy(mmd->afs_mode_string, arg, sizeof(mmd->afs_mode_string)); mmd->afs_mode_string[sizeof(mmd->afs_mode_string) - 1] = '\0'; - mmd_unlock(); + mutex_unlock(mmd_mutex); } else { - mmd_lock(); + mutex_lock(mmd_mutex); strcpy(mmd->afs_mode_string, "dummy"); - mmd_unlock(); + mutex_unlock(mmd_mutex); current_mop = NULL; } } @@ -1184,7 +1185,8 @@ void afs_event(enum afs_events event, struct para_buffer *pb, continue; ret = t->event_handler(event, pb, data); if (ret < 0) - PARA_CRIT_LOG("%s\n", para_strerror(-ret)); + PARA_CRIT_LOG("table %s, event %d: %s\n", t->name, + event, para_strerror(-ret)); } }