mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-11-04 05:15:22 +00:00 
			
		
		
		
	Minor change to use Asterisk macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		@@ -136,13 +136,16 @@ static AST_RWLIST_HEAD_STATIC(uri_redirects, http_uri_redirect);
 | 
			
		||||
static const char *ftype2mtype(const char *ftype, char *wkspace, int wkspacelen)
 | 
			
		||||
{
 | 
			
		||||
	int x;
 | 
			
		||||
 | 
			
		||||
	if (ftype) {
 | 
			
		||||
		for (x=0;x<sizeof(mimetypes) / sizeof(mimetypes[0]); x++) {
 | 
			
		||||
		for (x = 0; x < ARRAY_LEN(mimetypes); x++) {
 | 
			
		||||
			if (!strcasecmp(ftype, mimetypes[x].ext))
 | 
			
		||||
				return mimetypes[x].mtype;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	snprintf(wkspace, wkspacelen, "text/%s", ftype ? ftype : "plain");
 | 
			
		||||
 | 
			
		||||
	snprintf(wkspace, wkspacelen, "text/%s", S_OR(ftype, "plain"));
 | 
			
		||||
 | 
			
		||||
	return wkspace;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user