minor fix to content adaptation module
This commit is contained in:
parent
3f4df1cdc7
commit
85babd8de0
|
@ -1,3 +1,6 @@
|
||||||
|
2008-08-08 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||||
|
* Fix to content adaptation: Better handling of supported image types
|
||||||
|
thanks to George Barros <gbarros@ipcomsa.com>
|
||||||
2008-08-06 P. A. Bagyenda <bagyenda@dsmagic.com>
|
2008-08-06 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||||
* Additional fixes for bad message formats causing crash
|
* Additional fixes for bad message formats causing crash
|
||||||
* Fix for incorrect From and To headers in DLR and RR messages
|
* Fix for incorrect From and To headers in DLR and RR messages
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
EXTRA_DIST = tables.sql
|
||||||
lib_LTLIBRARIES = libmms_pgsql_queue.la
|
lib_LTLIBRARIES = libmms_pgsql_queue.la
|
||||||
libmms_pgsql_queue_la_SOURCES = mms_pgsql_queue.c
|
libmms_pgsql_queue_la_SOURCES = mms_pgsql_queue.c
|
||||||
libmms_pgsql_queue_la_LDFLAGS = -module
|
libmms_pgsql_queue_la_LDFLAGS = -module
|
||||||
|
|
|
@ -928,13 +928,16 @@ static int modify_msg(MIMEEntity *msg, MmsUaProfile *prof)
|
||||||
selector = "-[0]";
|
selector = "-[0]";
|
||||||
else
|
else
|
||||||
selector = "-";
|
selector = "-";
|
||||||
/* We have an unsupported image now. time to convert it. */
|
/* We have an unsupported image now, or a supported one that must be scaled.
|
||||||
|
* time to convert it.
|
||||||
|
*/
|
||||||
if (icmd) {
|
if (icmd) {
|
||||||
cmd = octstr_format("%S | " IMGCONVERTCMD,
|
cmd = (supported) ? octstr_format("%S > %s", icmd, tmpf) :
|
||||||
icmd, cformats[iindex].file_ext, selector,
|
octstr_format("%S | " IMGCONVERTCMD,
|
||||||
cformats[oindex].file_ext, tmpf);
|
icmd, cformats[iindex].file_ext, selector,
|
||||||
|
cformats[oindex].file_ext, tmpf);
|
||||||
octstr_destroy(icmd);
|
octstr_destroy(icmd);
|
||||||
} else
|
} else /* Image format MUST be unsupported */
|
||||||
cmd = octstr_format("cat %s | " IMGCONVERTCMD,
|
cmd = octstr_format("cat %s | " IMGCONVERTCMD,
|
||||||
tmpf2, cformats[iindex].file_ext, selector,
|
tmpf2, cformats[iindex].file_ext, selector,
|
||||||
cformats[oindex].file_ext, tmpf);
|
cformats[oindex].file_ext, tmpf);
|
||||||
|
@ -964,8 +967,8 @@ static int modify_msg(MIMEEntity *msg, MmsUaProfile *prof)
|
||||||
|
|
||||||
if ((s = octstr_read_file(tmpf)) != NULL) {
|
if ((s = octstr_read_file(tmpf)) != NULL) {
|
||||||
replace_body(msg, s, params_h,
|
replace_body(msg, s, params_h,
|
||||||
cformats[oindex].content_type,
|
supported == 1 ? cformats[iindex].content_type : cformats[oindex].content_type,
|
||||||
cformats[oindex].file_ext,0);
|
supported == 1 ? cformats[iindex].file_ext : cformats[oindex].file_ext,0);
|
||||||
octstr_destroy(s);
|
octstr_destroy(s);
|
||||||
supported = 1;
|
supported = 1;
|
||||||
goto done2; /* we are done, don't even change headers. */
|
goto done2; /* we are done, don't even change headers. */
|
||||||
|
|
Loading…
Reference in New Issue