[Asterisk-code-review] media cache: Add a core API and facade for a backend agnosti... (asterisk[master])

Matt Jordan asteriskteam at digium.com
Sat Jun 20 17:41:54 CDT 2015


Matt Jordan has posted comments on this change.

Change subject: media cache: Add a core API and facade for a backend agnostic media cache
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/487/1/main/media_cache.c
File main/media_cache.c:

Line 216: 		ast_bucket_file_update(bucket_file);
> For updating the backend you can use ast_bucket_file_copy to create a copy 
Actually, here I don't really want to use ast_bucket_file_copy, as that will also require copying the underlying file to a different location on the file system. At this point in time, I don't know that I even need to do that - the actual file itself may not have changed.

Looking at sorcery, it feels like what I really need is a call to ast_sorcery_copy, with a .copy callback on the "file" and "bucket" object types implemented in bucket. That way I get back a pristine ast_bucket_file clone, pointing to the same underlying file on the file system. If the cURL operation in the HTTP backend (which isn't part of this review) has to overwrite the file, that's a different point of synchronization that this part of the code can't quite handle.

I played around with this earlier today and I think I have an approach that mostly works, which I'll post in the next patch set. It does include the previously mentioned update to the bucket API.


-- 
To view, visit https://gerrit.asterisk.org/487
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I11227abbf14d8929eeb140ddd101dd5c3820391e
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list