struct timeval now;
struct tm mtime_tm;
- localtime_r(&nmmd->mtime, &mtime_tm);
- strftime(mtime, 29, "%a %b %d %Y", &mtime_tm);
/* report real status */
status = vss_status_tohuman(nmmd->vss_status_flags);
flags = vss_get_status_flags(nmmd->vss_status_flags);
basename = para_basename(nmmd->afd.path);
dirname = para_dirname(nmmd->afd.path);
+ if (basename) {
+ localtime_r(&nmmd->mtime, &mtime_tm);
+ strftime(mtime, 29, "%a %b %d %Y", &mtime_tm);
+ }
gettimeofday(&now, NULL);
ret = make_message(
"%s:%zu\n" "%s:%s\n" "%s:%lu\n" "%s:%u\n"
status_item_list[SI_IMAGE_ID], nmmd->afd.afsi.image_id,
status_item_list[SI_OFFSET], offset,
- status_item_list[SI_FORMAT], audio_format_name(nmmd->afd.afsi.audio_format_id),
+ status_item_list[SI_FORMAT], basename?
+ audio_format_name(nmmd->afd.afsi.audio_format_id)
+ : "",
status_item_list[SI_AFS_MODE], mmd->afs_mode_string,
nmmd->afd.afhi.info_string,
(long unsigned)now.tv_usec,
status_item_list[SI_ATTRIBUTES], mmd->afd.attributes_string,
- status_item_list[SI_DIRECTORY], dirname,
+ status_item_list[SI_DIRECTORY], dirname? dirname : "(none)",
status_item_list[SI_LYRICS_ID], nmmd->afd.afsi.lyrics_id
);