I cherry-picked it to 4.2.7
Dialog was deleted a after 5mins (according to tdlg->end_ts<tm-300 ), but it still may confuse configs with current call limit check (get_profile_size calling can't get dialog status as parameter )
May be unref dialog after DLG_EVENT_RPL3xx at once? I can't dive into dialog module source code now, so not sure is this safe, but it works:
diff --git a/modules/dialog/dlg_hash.c b/modules/dialog/dlg_hash.c
index a305468..202f0b9 100644
--- a/modules/dialog/dlg_hash.c
+++ b/modules/dialog/dlg_hash.c
@@ -965,6 +965,7 @@ void next_state_dlg(dlg_cell_t *dlg, int event,
case DLG_STATE_UNCONFIRMED:
case DLG_STATE_EARLY:
dlg->state = DLG_STATE_DELETED;
+ unref_dlg_unsafe(dlg,1,d_entry);
*unref = 1;
break;
default:
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/23a3481302d5aca04be0e8d10f6d4ce…
Hi there.
When I try to add the following line to my config script:
```
if (is_method("INFO") && has_body("application/media_control+xml"))
```
Kamailio fails to start with these errors:
> 0(12) ERROR: <core> [parser/parse_content.c:370]: decode_mime_type(): ERROR:decode_mime_type: parse error near in [application/media_control+xml] char[95][_] offset=17
> 0(12) ERROR: textops [textops.c:2426]: fixup_body_type(): unsupported mime <application/media_control+xml>
> 0(12) ERROR: <core> [route.c:1154]: fix_actions(): fixing failed (code=-6) at cfg:/etc/kamailio/kamailio.cfg:549
> 0(12) ERROR: <core> [route.c:1154]: fix_actions(): fixing failed (code=-6) at cfg:/etc/kamailio/kamailio.cfg:556
> 0(12) ERROR: <core> [route.c:1154]: fix_actions(): fixing failed (code=-6) at cfg:/etc/kamailio/kamailio.cfg:568
> ERROR: error -6 while trying to fix configuration
This is with the official Debian packages of Kamailio 4.3.5.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/547
Module: kamailio
Branch: 4.3
Commit: 541fcf7c17bc139089057f93a6bff1c94ddedca5
URL: https://github.com/kamailio/kamailio/commit/541fcf7c17bc139089057f93a6bff1c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-03-18T13:35:58+01:00
core: parse content type allows '_' char
- reported by Fabio Margarido, GH #547
(cherry picked from commit b65927a8f6039810ffdb7b7f31ce2d36c9535fbd)
(cherry picked from commit 50df69df2b7a5307802f6dcaac9b90acfbe2b44d)
---
Modified: parser/parse_content.c
---
Diff: https://github.com/kamailio/kamailio/commit/541fcf7c17bc139089057f93a6bff1c…
Patch: https://github.com/kamailio/kamailio/commit/541fcf7c17bc139089057f93a6bff1c…
---
diff --git a/parser/parse_content.c b/parser/parse_content.c
index 3c10a5e..edb109a 100644
--- a/parser/parse_content.c
+++ b/parser/parse_content.c
@@ -13,8 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
@@ -38,7 +38,7 @@
#define is_mime_char(_c_) \
- (isalpha((int)_c_) || (_c_)=='-' || (_c_)=='+' || (_c_)=='.')
+ (isalpha((int)_c_) || (_c_)=='-' || (_c_)=='+' || (_c_)=='.' || (_c_)=='_')
#define is_char_equal(_c_,_cs_) \
( (isalpha((int)_c_)?(((_c_)|0x20)==(_cs_)):((_c_)==(_cs_)))==1 )
@@ -180,7 +180,7 @@ static type_node_t subtype_tree[] = {
{'c',SUBTYPE_UNKNOWN,1,-1},
{'.',SUBTYPE_UNKNOWN,1,-1},
{'p',SUBTYPE_UNKNOWN,1,-1},
- {'i',SUBTYPE_UNKNOWN,1,-1},
+ {'i',SUBTYPE_UNKNOWN,1,-1},
{'d',SUBTYPE_UNKNOWN,1,-1},
{'f',SUBTYPE_XML_MSRTC_PIDF,0,-1},
{'e',SUBTYPE_UNKNOWN,1,107}, /* 94 */
@@ -327,7 +327,7 @@ char* decode_mime_type(char* const start, const char* const end, unsigned int* c
if (node!=-1) {
type_candidate = subtype_tree[node].final;
if (subtype_tree[node].nr_sons)
- node++;
+ node++;
else
node = -1;
} else {
@@ -432,10 +432,10 @@ int parse_accept_body(struct hdr_field* const hdr)
char *ret;
if (!hdr) return -1;
-
+
/* maybe the header is already parsed! */
if (hdr->parsed!=0) return 1;
-
+
/* it seams we have to parse it! :-( */
ret = hdr->body.s;
end = ret + hdr->body.len;
Module: kamailio
Branch: 4.4
Commit: 50df69df2b7a5307802f6dcaac9b90acfbe2b44d
URL: https://github.com/kamailio/kamailio/commit/50df69df2b7a5307802f6dcaac9b90a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-03-18T13:34:23+01:00
core: parse content type allows '_' char
- reported by Fabio Margarido, GH #547
(cherry picked from commit b65927a8f6039810ffdb7b7f31ce2d36c9535fbd)
---
Modified: parser/parse_content.c
---
Diff: https://github.com/kamailio/kamailio/commit/50df69df2b7a5307802f6dcaac9b90a…
Patch: https://github.com/kamailio/kamailio/commit/50df69df2b7a5307802f6dcaac9b90a…
---
diff --git a/parser/parse_content.c b/parser/parse_content.c
index 3c10a5e..edb109a 100644
--- a/parser/parse_content.c
+++ b/parser/parse_content.c
@@ -13,8 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
@@ -38,7 +38,7 @@
#define is_mime_char(_c_) \
- (isalpha((int)_c_) || (_c_)=='-' || (_c_)=='+' || (_c_)=='.')
+ (isalpha((int)_c_) || (_c_)=='-' || (_c_)=='+' || (_c_)=='.' || (_c_)=='_')
#define is_char_equal(_c_,_cs_) \
( (isalpha((int)_c_)?(((_c_)|0x20)==(_cs_)):((_c_)==(_cs_)))==1 )
@@ -180,7 +180,7 @@ static type_node_t subtype_tree[] = {
{'c',SUBTYPE_UNKNOWN,1,-1},
{'.',SUBTYPE_UNKNOWN,1,-1},
{'p',SUBTYPE_UNKNOWN,1,-1},
- {'i',SUBTYPE_UNKNOWN,1,-1},
+ {'i',SUBTYPE_UNKNOWN,1,-1},
{'d',SUBTYPE_UNKNOWN,1,-1},
{'f',SUBTYPE_XML_MSRTC_PIDF,0,-1},
{'e',SUBTYPE_UNKNOWN,1,107}, /* 94 */
@@ -327,7 +327,7 @@ char* decode_mime_type(char* const start, const char* const end, unsigned int* c
if (node!=-1) {
type_candidate = subtype_tree[node].final;
if (subtype_tree[node].nr_sons)
- node++;
+ node++;
else
node = -1;
} else {
@@ -432,10 +432,10 @@ int parse_accept_body(struct hdr_field* const hdr)
char *ret;
if (!hdr) return -1;
-
+
/* maybe the header is already parsed! */
if (hdr->parsed!=0) return 1;
-
+
/* it seams we have to parse it! :-( */
ret = hdr->body.s;
end = ret + hdr->body.len;
Module: kamailio
Branch: master
Commit: b65927a8f6039810ffdb7b7f31ce2d36c9535fbd
URL: https://github.com/kamailio/kamailio/commit/b65927a8f6039810ffdb7b7f31ce2d3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-03-18T13:32:59+01:00
core: parse content type allows '_' char
- reported by Fabio Margarido, GH #547
---
Modified: parser/parse_content.c
---
Diff: https://github.com/kamailio/kamailio/commit/b65927a8f6039810ffdb7b7f31ce2d3…
Patch: https://github.com/kamailio/kamailio/commit/b65927a8f6039810ffdb7b7f31ce2d3…
---
diff --git a/parser/parse_content.c b/parser/parse_content.c
index 3c10a5e..edb109a 100644
--- a/parser/parse_content.c
+++ b/parser/parse_content.c
@@ -13,8 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
@@ -38,7 +38,7 @@
#define is_mime_char(_c_) \
- (isalpha((int)_c_) || (_c_)=='-' || (_c_)=='+' || (_c_)=='.')
+ (isalpha((int)_c_) || (_c_)=='-' || (_c_)=='+' || (_c_)=='.' || (_c_)=='_')
#define is_char_equal(_c_,_cs_) \
( (isalpha((int)_c_)?(((_c_)|0x20)==(_cs_)):((_c_)==(_cs_)))==1 )
@@ -180,7 +180,7 @@ static type_node_t subtype_tree[] = {
{'c',SUBTYPE_UNKNOWN,1,-1},
{'.',SUBTYPE_UNKNOWN,1,-1},
{'p',SUBTYPE_UNKNOWN,1,-1},
- {'i',SUBTYPE_UNKNOWN,1,-1},
+ {'i',SUBTYPE_UNKNOWN,1,-1},
{'d',SUBTYPE_UNKNOWN,1,-1},
{'f',SUBTYPE_XML_MSRTC_PIDF,0,-1},
{'e',SUBTYPE_UNKNOWN,1,107}, /* 94 */
@@ -327,7 +327,7 @@ char* decode_mime_type(char* const start, const char* const end, unsigned int* c
if (node!=-1) {
type_candidate = subtype_tree[node].final;
if (subtype_tree[node].nr_sons)
- node++;
+ node++;
else
node = -1;
} else {
@@ -432,10 +432,10 @@ int parse_accept_body(struct hdr_field* const hdr)
char *ret;
if (!hdr) return -1;
-
+
/* maybe the header is already parsed! */
if (hdr->parsed!=0) return 1;
-
+
/* it seams we have to parse it! :-( */
ret = hdr->body.s;
end = ret + hdr->body.len;