Block path replacement(temporary)
[platform/core/api/media-content.git] / src / media_filter.c
index 8ca675f..6b91c16 100755 (executable)
@@ -209,6 +209,14 @@ int media_filter_set_condition(filter_h filter, const char *condition, media_con
                        SAFE_FREE(_filter->condition);
 
                _filter->condition = _media_content_replace_path_in_condition(condition);
+
+               /* FIXME
+                       If an error is occured in _media_content_replace_path_in_condition(),
+                       A suitable return value is 'MEDIA_CONTENT_ERROR_INVALID_OPERATION'.
+                       However, it is not stated in the description of media_filter_set_condition().
+                       Therefore, use 'MEDIA_CONTENT_ERROR_OUT_OF_MEMORY' temporarily.
+                       It will be modified after removing _media_content_replace_path_in_condition() function.
+               */
                media_content_retvm_if(_filter->condition == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Fail to _media_content_replace_path_in_condition");
 
                media_content_sec_debug("Condition string : %s", _filter->condition);
@@ -363,6 +371,13 @@ int media_filter_set_condition_v2(filter_h filter, const char *condition)
                if (STRING_VALID(_filter->condition))
                        SAFE_FREE(_filter->condition);
 
+               /* FIXME
+                       If an error is occured in _media_content_replace_path_in_condition(),
+                       A suitable return value is 'MEDIA_CONTENT_ERROR_INVALID_OPERATION'.
+                       However, it is not stated in the description of media_filter_set_condition().
+                       Therefore, use 'MEDIA_CONTENT_ERROR_OUT_OF_MEMORY' temporarily.
+                       It will be modified after removing _media_content_replace_path_in_condition() function.
+               */
                _filter->condition = _media_content_replace_path_in_condition(condition);
                media_content_retvm_if(_filter->condition == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Fail to _media_content_replace_path_in_condition");