Hi,
I use only rtpengine_manage() function of
rtpengine_{offer,answer,delete} and it is called from different
locations like request_route, onreply_route, failure_route.
To have everything in one place I call a route[RTPENGINE_MANAGE] which
in its turn prepares rtpengine parameters string (ICE, profiles, flags)
and calls rtpengine_manage(). When this route is called from
failure_route rtpengine_manage() is supposed to behave like
rtpengine_delete() and it does. The only problem is that when it
receives flags in its parameters string (no-rtcp-attribute in my case)
it fails with "rtpengine:parse_flags: error processing flag
`no-rtcp-attribute': no more memory" message instead of just ignoring
useless for delete operation parameters.
Attaching the patch that fixed this problem for me. Not sure if this is
a bug or lack of module documentation.
diff --git a/modules/rtpengine/rtpengine.c b/modules/rtpengine/rtpengine.c
index 2d1a1d3..d9dc4df 100644
--- a/modules/rtpengine/rtpengine.c
+++ b/modules/rtpengine/rtpengine.c
@@ -1666,6 +1666,7 @@ static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg,
if (!val.s) {
bitem = bencode_str(bencode_item_buffer(ng_flags->flags), &key);
if (!bitem) {
+ LM_ERR("XXX ng_flags->glags => %p\n", ng_flags->flags);
err = "no more memory";
goto error;
}
@@ -1766,8 +1767,10 @@ static bencode_item_t *rtpe_function_call(bencode_buffer_t *bencbuf, struct sip_
ng_flags.to = (op == OP_DELETE) ? 0 : 1;
- if (parse_flags(&ng_flags, msg, &op, flags_str))
- goto error;
+ if (op != OP_DELETE) {
+ if (parse_flags(&ng_flags, msg, &op, flags_str))
+ goto error;
+ }
/* only add those if any flags were given at all */
if (ng_flags.direction && ng_flags.direction->child)
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users