[Asterisk-code-review] Add the ability to read the media file type from HTTP header... (asterisk[15])
Sean Bright
asteriskteam at digium.com
Wed Feb 14 08:22:41 CST 2018
Sean Bright has posted comments on this change. ( https://gerrit.asterisk.org/8209 )
Change subject: Add the ability to read the media file type from HTTP header for playback
......................................................................
Patch Set 4: Code-Review-1
(4 comments)
https://gerrit.asterisk.org/#/c/8209/4/include/asterisk/file.h
File include/asterisk/file.h:
https://gerrit.asterisk.org/#/c/8209/4/include/asterisk/file.h@430
PS4, Line 430: /*!
: * \brief Get the extensions associated with the given MIME TYPE
: *
: * \param mime_type XXX: Document me
: * \param exts XXX: Document me
: *
: * \retval 1 XXX: Documemt me
: * \retval 0 XXX: Document me
: */
You had copied documentation from another function and put it here. The behavior of this function needs to be properly documented.
https://gerrit.asterisk.org/#/c/8209/4/include/asterisk/mod_format.h
File include/asterisk/mod_format.h:
https://gerrit.asterisk.org/#/c/8209/4/include/asterisk/mod_format.h@47
PS4, Line 47: char mime_types[80]; /*!< MIME Types related to the format (separated by | if more than one)*/
Is 80 bytes enough? Do we maybe want to use a list here instead of the pipe delimited list?
https://gerrit.asterisk.org/#/c/8209/4/main/file.c
File main/file.c:
https://gerrit.asterisk.org/#/c/8209/4/main/file.c@1944
PS4, Line 1944: int ast_get_extensions_for_mime_type(const char *mime_type, char *exts)
You will want to add an argument to this function that takes the size of 'exts' so that you can ensure that you do not overflow it when copying.
https://gerrit.asterisk.org/#/c/8209/4/main/file.c@1950
PS4, Line 1950: if (exts) {
If 'exts' is NULL this function will do nothing and only ever return 0.
--
To view, visit https://gerrit.asterisk.org/8209
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b14692a49b2c1ac67688f58757184122e92ba89
Gerrit-Change-Number: 8209
Gerrit-PatchSet: 4
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Gaurav Khurana <gkhurana at godaddy.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Wed, 14 Feb 2018 14:22:41 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180214/fa68cb8c/attachment-0001.html>
More information about the asterisk-code-review
mailing list