Hi All,
The function parse_content_type_hdr() is failing in decode_mime_type() when
Content-Type parameter "boundary" has value comma as below. The error
message is "ERROR:parse_content_type_hdr: CONTENT_TYPE hdr contains "
"more then one mime type :-(!
Content Type Header is as below, It works fine if the boundary value is
without comma.
Content-Type: multipart/mixed;boundary="*,*AW"
The parse_content_type_hdr() is failing in the following code,
ret = decode_mime_type(msg->content_type->body.s, end , &mime);
if (ret==0)
goto error;
if (ret!=end) {
LOG(L_INFO,"ERROR:parse_content_type_hdr: CONTENT_TYPE hdr contains
"
"more then one mime type :-(!\n");
goto error ;
}
I thought of fixing this issue by commenting the code for condition ret
!=end. I'm not sure why we we need that check, as mime variable has the
information to process the content.
Please let me know if you see any impact.
Thanks
Jijo
i just compiled master, and got these warnings:
CC (cc) [M db_mysql.so] km_db_mysql.o
km_db_mysql.c: In function ‘kam_mysql_mod_init’:
km_db_mysql.c:93: warning: implicit declaration of function ‘db_mysql_alloc_buffer’
CC (cc) [M rls.so] resource_notify.o
resource_notify.c:51:1: warning: "CONT_COPY" redefined
In file included from rls.h:37,
from resource_notify.c:38:
../presence/hash.h:52:1: warning: this is the location of the previous definition
CC (cc) [M xcap_server.so] xcap_server.o
xcap_server.c:422: warning: ‘xcaps_str_appsexml’ defined but not used
especially the first one sounds dangerous.
-- juha
Module: sip-router
Branch: master
Commit: bd598ce945d8e5db910ea1a12795c5cdd7d580cf
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bd598ce…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Aug 17 15:01:26 2011 +0100
modules_k/presence, modules_k/presence_xml: Added new exported functions to enable the online status of a user to be checked
- Exported two new API functions from presence (get_presentity() and
free_presentity()). These functions are used by the new exported
functions.
- Added two new exported functions to presence_xml. pres_check_basic()
enables you to find out whether a users basic status matches the
string you provide. pres_check_activities() enables you to find out
whether any of a users listed activities matches the string you
provide.
pres_check_basic() effectively lets you tell whether a user is
online or offline (based on presence). pres_check_activities()
lets you see what a user is currently doing (for example, is the
user too busy to take a call?).
The results from these exported functions can be used to make
routing decisions. For example, you can choose not to route calls
to users who are away or busy.
---
modules_k/presence/README | 31 +++
modules_k/presence/bind_presence.c | 3 +
modules_k/presence/bind_presence.h | 4 +
modules_k/presence/doc/presence_devel.xml | 45 +++++
modules_k/presence/notify.c | 64 ++----
modules_k/presence/notify.h | 2 +
modules_k/presence_xml/README | 60 ++++++-
modules_k/presence_xml/doc/presence_xml_admin.xml | 88 ++++++++-
modules_k/presence_xml/pres_check.c | 220 +++++++++++++++++++++
modules_k/presence_xml/pres_check.h | 32 +++
modules_k/presence_xml/presence_xml.c | 14 ++-
11 files changed, 515 insertions(+), 48 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=bd5…
Module: sip-router
Branch: master
Commit: 11033b05be673593a87afdc2a1d8a2c887fb9ab7
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=11033b0…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Wed Aug 17 15:00:00 2011 +0300
modules_k/dialog When hash_size was smaller then 1, consider this as a value(1 == 2^0)
The 1<<(n-1) check for the power of two smaller than the given number doesn't work for n == 0 (undefined behavior),
so values of dlg_hash_size smaller than 1 where not checked correctly.
---
modules_k/dialog/dialog.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/modules_k/dialog/dialog.c b/modules_k/dialog/dialog.c
index d31135a..6711732 100644
--- a/modules_k/dialog/dialog.c
+++ b/modules_k/dialog/dialog.c
@@ -603,11 +603,18 @@ static int mod_init(void)
return -1;
}
+ /* sanitize dlg_hash_zie */
+ if (dlg_hash_size < 1){
+ LM_WARN("hash_size is smaller "
+ "then 1 -> rounding from %d to 1\n",
+ dlg_hash_size);
+ dlg_hash_size = 1;
+ }
/* initialized the hash table */
for( n=0 ; n<(8*sizeof(n)) ; n++) {
if (dlg_hash_size==(1<<n))
break;
- if (dlg_hash_size<(1<<n)) {
+ if (n && dlg_hash_size<(1<<n)) {
LM_WARN("hash_size is not a power "
"of 2 as it should be -> rounding from %d to %d\n",
dlg_hash_size, 1<<(n-1));
Hi all
Nightly builds for debian and ubuntu have failed for "master" branch. Here's
the compilation log:
LD (gcc) [M pua_bla.so] pua_bla.so
CC (gcc) [M pua_dialoginfo.so] dialog_publish.o
CC (gcc) [M pua_dialoginfo.so] pua_dialoginfo.o
pua_dialoginfo.c: In function ‘__dialog_sendpublish’:
pua_dialoginfo.c:231: error: ‘struct dlg_cb_params’ has no member named ‘msg’
pua_dialoginfo.c:231: error: ‘struct dlg_cb_params’ has no member named ‘msg’
pua_dialoginfo.c:231: error: ‘struct dlg_cb_params’ has no member named ‘msg’
pua_dialoginfo.c:234: error: ‘struct dlg_cb_params’ has no member named ‘msg’
pua_dialoginfo.c:235: error: ‘struct dlg_cb_params’ has no member named ‘msg’
pua_dialoginfo.c:236: error: ‘struct dlg_cb_params’ has no member named ‘msg’
pua_dialoginfo.c:239: error: ‘struct dlg_cb_params’ has no member named ‘msg’
pua_dialoginfo.c:243: error: ‘struct dlg_cb_params’ has no member named ‘msg’
pua_dialoginfo.c:243: error: ‘struct dlg_cb_params’ has no member named ‘msg’
pua_dialoginfo.c:243: error: ‘struct dlg_cb_params’ has no member named ‘msg’
pua_dialoginfo.c:248: error: ‘struct dlg_cb_params’ has no member named ‘msg’
pua_dialoginfo.c: In function ‘__dialog_created’:
pua_dialoginfo.c:284: error: ‘struct dlg_cb_params’ has no member named ‘msg’
make[2]: *** [pua_dialoginfo.o] Error 1
make[1]: *** [modules_k] Error 1
make[1]: se sale del directorio `/usr/src/kamailio/kamailiogitsrc-master'
make: *** [build-stamp] Error 2
dpkg-buildpackage: fallo: debian/rules build devolvió un estado de salida de
error 2
cheers,
Jon