mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
oops, I wasn't done with this
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
35
rtp.c
35
rtp.c
@@ -795,41 +795,6 @@ char* ast_rtp_lookup_mime_subtype(int isAstFormat, int code) {
|
||||
return "";
|
||||
}
|
||||
|
||||
char *ast_rtp_lookup_mime_multiple(char *buf, int size, const int capability, const int isAstFormat)
|
||||
{
|
||||
int format;
|
||||
unsigned len;
|
||||
char *end = buf;
|
||||
char *start = buf;
|
||||
|
||||
if (!buf || !size)
|
||||
return NULL;
|
||||
|
||||
snprintf(end, size, "0x%x (", capability);
|
||||
|
||||
len = strlen(end);
|
||||
end += len;
|
||||
size -= len;
|
||||
start = end;
|
||||
|
||||
for (format = 1; format < AST_RTP_MAX; format <<= 1) {
|
||||
if (capability & format) {
|
||||
const char *name = ast_rtp_lookup_mime_subtype(isAstFormat, format);
|
||||
snprintf(end, size, "%s|", name);
|
||||
len = strlen(end);
|
||||
end += len;
|
||||
size -= len;
|
||||
}
|
||||
}
|
||||
|
||||
if (start == end)
|
||||
snprintf(start, size, "nothing)");
|
||||
else if (size > 1)
|
||||
*(end -1) = ')';
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
static int rtp_socket(void)
|
||||
{
|
||||
int s;
|
||||
|
Reference in New Issue
Block a user