return FALSE;
}
-static void __callmgr_vr_get_oldest_file(char **media_id, char **file_path)
+static void __callmgr_vr_get_oldest_file(char **file_path)
{
media_info_h media = NULL;
int ret = MEDIA_CONTENT_ERROR_NONE;
media_filter_destroy(filter);
- if (media_id) {
- ret = media_info_get_media_id(media, media_id);
- if (ret != MEDIA_CONTENT_ERROR_NONE) {
- err("media_info_get_media_id() failed : [%d]", ret);
- }
- }
-
if (file_path) {
ret = media_info_get_file_path(media, file_path);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
dbg("File count from DB : [%d]", count);
if (count == CM_VR_FILE_NUMBER_MAX) {
- char *media_id = NULL;
+
char *file_path = NULL;
int ret = MEDIA_CONTENT_ERROR_NONE;
ret = media_content_connect();
if (ret == MEDIA_CONTENT_ERROR_NONE) {
- __callmgr_vr_get_oldest_file(&media_id, &file_path);
+ __callmgr_vr_get_oldest_file(&file_path);
if (__callmgr_vr_files_remove_file_real(file_path) >= 0) {
- int err = media_info_delete_from_db(media_id);
+ int err = media_content_scan_file(file_path);
if (err != MEDIA_CONTENT_ERROR_NONE) {
- err("media_info_delete_from_db Failed : [%d]", err);
+ err("media_content_scan_file Failed : [%d]", err);
result = -1;
}
} else {
free(file_path);
file_path = NULL;
}
- if (media_id) {
- free(media_id);
- media_id = NULL;
- }
media_content_disconnect();
} else {