Module: sip-router
Branch: kamailio_3.0
Commit: 16bdf9ea21b310d49d5d99dee43cfd57990eb1bb
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=16bdf9e…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Tue May 4 13:10:03 2010 +0300
Modules:carrierroute: Fixed a bug in carrirroute module that might cause a crash if the routing prob was larger than the number of available routes.
The problem was caused by a missing else
---
modules/carrierroute/cr_func.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/carrierroute/cr_func.c b/modules/carrierroute/cr_func.c
index d37d658..ff43242 100644
--- a/modules/carrierroute/cr_func.c
+++ b/modules/carrierroute/cr_func.c
@@ -257,7 +257,7 @@ static struct route_rule * get_rule_by_hash(const struct route_flags * rf,
LM_WARN("too large desired hash, taking highest\n");
act_hash = rf->rules[rf->rule_num - 1];
}
- act_hash = rf->rules[prob - 1];
+ else act_hash = rf->rules[prob - 1];
if (!act_hash->status) {
if (act_hash->backup && act_hash->backup->rr) {
Module: sip-router
Branch: master
Commit: 7a67e04c7cd6c18f66f62305aa620fb6f632f12e
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7a67e04…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed May 26 11:50:00 2010 +0200
xhttp: added supported version
---
modules/xhttp/README | 6 +++---
modules/xhttp/doc/xhttp_admin.xml | 2 +-
modules/xhttp/xhttp_mod.c | 2 ++
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/xhttp/README b/modules/xhttp/README
index 6a7aa2e..1ae565e 100644
--- a/modules/xhttp/README
+++ b/modules/xhttp/README
@@ -56,9 +56,9 @@ Chapter 1. Admin Guide
1. Overview
- This module provides a basic HTTP server functionaly inside SIP server.
- SIP and HTTP are very similar protocols, practically the SIP parser can
- handle easy HTTP requests just by adding a fake Via header.
+ This module provides a basic HTTP/1.0 server functionaly inside SIP
+ server. SIP and HTTP are very similar protocols, practically the SIP
+ parser can handle easy HTTP requests just by adding a fake Via header.
The xmlrpc module uses the same concept. xHTTP module offers a generic
HTTP handling way, by calling event_route[xhttp:request] in your
diff --git a/modules/xhttp/doc/xhttp_admin.xml b/modules/xhttp/doc/xhttp_admin.xml
index 3e1b2dc..395a450 100644
--- a/modules/xhttp/doc/xhttp_admin.xml
+++ b/modules/xhttp/doc/xhttp_admin.xml
@@ -16,7 +16,7 @@
<section>
<title>Overview</title>
<para>
- This module provides a basic HTTP server functionaly inside SIP
+ This module provides a basic HTTP/1.0 server functionaly inside SIP
server. SIP and HTTP are very similar protocols, practically the
SIP parser can handle easy HTTP requests just by adding a fake
Via header.
diff --git a/modules/xhttp/xhttp_mod.c b/modules/xhttp/xhttp_mod.c
index 48beb1b..0492457 100644
--- a/modules/xhttp/xhttp_mod.c
+++ b/modules/xhttp/xhttp_mod.c
@@ -292,6 +292,8 @@ static int xhttp_handler(sip_msg_t* msg)
return NONSIP_MSG_PASS;
}
+ /* we support HTTP/1.0 - fix it for replies */
+ msg->first_line.u.request.version.s[HTTP_VERSION_LEN] = '0';
if(xhttp_url_match!=NULL)
{
c = msg->first_line.u.request.uri.s[msg->first_line.u.request.uri.len];