Module: kamailio
Branch: 4.2
Commit: 38d6c0bc62b12ecb8402d165a21813c533c55324
URL:
https://github.com/kamailio/kamailio/commit/38d6c0bc62b12ecb8402d165a21813c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-01-15T20:14:29+01:00
core: parse_ppi_pai - free header parameters for PAI and PPI
- they are not considere in the compacted p_id_body_t and not freed
- specs don't mention headers parameters for PAI and PPI, but could come
as UA extensions
(cherry picked from commit c1b4d442501591bd18e8130474eeb5c16101e549)
---
Modified: parser/parse_ppi_pai.c
---
Diff:
https://github.com/kamailio/kamailio/commit/38d6c0bc62b12ecb8402d165a21813c…
Patch:
https://github.com/kamailio/kamailio/commit/38d6c0bc62b12ecb8402d165a21813c…
---
diff --git a/parser/parse_ppi_pai.c b/parser/parse_ppi_pai.c
index db50dc9..a82b50e 100644
--- a/parser/parse_ppi_pai.c
+++ b/parser/parse_ppi_pai.c
@@ -62,6 +62,8 @@ int parse_pai_ppi_body(char *buf, int len, p_id_body_t **body)
LM_ERR("Error parsing PAI/PPI body %u '%.*s'\n", num_uri, len, buf);
return -1;
}
+ /* should be no header params, but in case there are, free them */
+ free_to_params(&uri_b[num_uri]);
num_uri++;
while ((*tmp == ',') && (num_uri < NUM_PAI_BODIES))
{
@@ -72,6 +74,8 @@ int parse_pai_ppi_body(char *buf, int len, p_id_body_t **body)
LM_ERR("Error parsing PAI/PPI body %u '%.*s'\n", num_uri, len,
buf);
return -1;
}
+ /* should be no header params, but in case there are, free them */
+ free_to_params(&uri_b[num_uri]);
num_uri++;
}
if (num_uri >= NUM_PAI_BODIES)