[Asterisk-cvs] asterisk rtp.c,1.92.2.14,1.92.2.15
russell at lists.digium.com
russell at lists.digium.com
Fri Jun 24 17:52:35 CDT 2005
- Previous message: [Asterisk-cvs] asterisk-addons/asterisk-ooh323c/ooh323c/src
ooGkClient.c, 1.2, 1.3 ooSocket.c, 1.3, 1.4 ooSocket.h, 1.3,
1.4 oochannels.c, 1.5, 1.6 ooh323ep.c, 1.3, 1.4 ooh323ep.h,
1.4, 1.5 ooports.c, 1.3, 1.4 ooports.h, 1.3, 1.4 ooq931.c, 1.5, 1.6
- Next message: [Asterisk-cvs] asterisk/include/asterisk rtp.h,1.16,1.16.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv30474
Modified Files:
Tag: v1-0
rtp.c
Log Message:
print non-codec capabilities correctly (bug #3960)
Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.92.2.14
retrieving revision 1.92.2.15
diff -u -d -r1.92.2.14 -r1.92.2.15
--- rtp.c 31 May 2005 12:55:43 -0000 1.92.2.14
+++ rtp.c 24 Jun 2005 21:53:02 -0000 1.92.2.15
@@ -753,7 +753,7 @@
}
/* Looks up an RTP code out of our *static* outbound list */
-int ast_rtp_lookup_code(struct ast_rtp* rtp, int isAstFormat, int code) {
+int ast_rtp_lookup_code(struct ast_rtp* rtp, const int isAstFormat, const int code) {
int pt;
@@ -787,7 +787,7 @@
return -1;
}
-char* ast_rtp_lookup_mime_subtype(int isAstFormat, int code) {
+char* ast_rtp_lookup_mime_subtype(const int isAstFormat, const int code) {
int i;
for (i = 0; i < sizeof mimeTypes/sizeof mimeTypes[0]; ++i) {
@@ -799,6 +799,41 @@
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;
- Previous message: [Asterisk-cvs] asterisk-addons/asterisk-ooh323c/ooh323c/src
ooGkClient.c, 1.2, 1.3 ooSocket.c, 1.3, 1.4 ooSocket.h, 1.3,
1.4 oochannels.c, 1.5, 1.6 ooh323ep.c, 1.3, 1.4 ooh323ep.h,
1.4, 1.5 ooports.c, 1.3, 1.4 ooports.h, 1.3, 1.4 ooq931.c, 1.5, 1.6
- Next message: [Asterisk-cvs] asterisk/include/asterisk rtp.h,1.16,1.16.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list