Hi!
there are various TLS parameters in core:
tls_ca_list
tls_certificate
tls_handshake_timeout
tlslog
tls_method
tls_port_no
tls_private_key
tls_require_certificate
tls_send_timeout
tls_verify
Are they still needed? IIRC TLS is now configured by a separate config
file, thus it would make sense to remove them.
regards
klaus
i wrote in python a simple text that sends domain_reload command over s
xmlrpc interface to sr:
---------------------------------------------------------------
import xmlrpclib
XMLRPC_PROTOCOL = 'http'
XMLRPC_SERVER = '127.0.0.1'
XMLRPC_PORT = 6060
server_path = XMLRPC_PROTOCOL + '://' + XMLRPC_SERVER + \
':' + str(XMLRPC_PORT)
c = xmlrpclib.ServerProxy(server_path)
erg = c.domain_reload()
----------------------------------------------------------------
when i execute the program, ngrep immediately prints what one would
expect:
T 2009/07/04 17:20:02.455028 127.0.0.1:33418 -> 127.0.0.1:6060 [AP]
POST /RPC2 HTTP/1.0..Host: 127.0.0.1:6060..User-Agent: xmlrpclib.py/1.0.1 (
by www.pythonware.com)..Content-Type: text/xml..Content-Length: 107....
##
T 2009/07/04 17:20:02.455358 127.0.0.1:33418 -> 127.0.0.1:6060 [AP]
<?xml version='1.0'?>.<methodCall>.<methodName>domain_reload</methodName>.<
params>.</params>.</methodCall>.
##
T 2009/07/04 17:20:02.455718 127.0.0.1:6060 -> 127.0.0.1:33418 [AP]
HTTP/1.0 200 OK..Via: SIP/2.0/TCP 127.0.0.1:33418..Server: SIP Route
r (2.99.0-dev01-serk (i386/linux))..Content-Length: 274....<?xml version="1
.0"?>.<methodResponse>.<fault>.<value>.<struct>.<member>.<name>faultCode</n
ame>.<value><int>500</int></value>.</member>.<member>.<name>faultString</na
me>.<value><string>Method Not Found</string></value>.</member>.</struct>.</
value>.</fault>.</methodResponse>
however, python client program does not terminate until after more
than 2 minutes. then it finally prints:
Traceback (most recent call last):
File "sr-xmlrpc.py", line 15, in <module>
erg = c.domain_reload()
File "/usr/lib/python2.5/xmlrpclib.py", line 1147, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.5/xmlrpclib.py", line 1437, in __request
verbose=self.__verbose
File "/usr/lib/python2.5/xmlrpclib.py", line 1201, in request
return self._parse_response(h.getfile(), sock)
File "/usr/lib/python2.5/xmlrpclib.py", line 1340, in _parse_response
return u.close()
File "/usr/lib/python2.5/xmlrpclib.py", line 787, in close
raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 500: 'Method Not Found'>
i also tested with a php xmlrcp client with same result.
any idea why it takes so long and why parsing of response fails? is
something missing from the response?
-- juha
andrei 2009/07/14 09:40:17 CEST
SER CVS Repository
Modified files:
parser msg_parser.c
Log:
core: parse_headers flags fix
Restore original flags after parse_headers was called with "next"
(without restoring them, if parse_headers doesn't find again all
the requested headers it will leave their flags cleared although
they might be present in the message).
Revision Changes Path
1.62 +8 -3 sip_router/parser/msg_parser.c
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/parser/msg_parser.…
andrei 2009/07/14 09:38:33 CEST
SER CVS Repository
Modified files:
modules/tm t_fifo.c
Log:
tm: fifo access From fix
Access the From header contents only if non-null.
Revision Changes Path
1.32 +2 -2 sip_router/modules/tm/t_fifo.c
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/modules/tm/t_fifo.…
andrei 2009/07/14 09:36:51 CEST
SER CVS Repository
Modified files:
modules/presence_b2b euac_funcs.c
Log:
presence_b2b: fix from & to header access
Access the parsed part of a From or To header only if non-zero
and/or parse_from_header() returned success.
Revision Changes Path
1.16 +4 -2 sip_router/modules/presence_b2b/euac_funcs.c
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/modules/presence_b…
andrei 2009/07/14 09:36:20 CEST
SER CVS Repository
Modified files:
modules/rr loose.c
Log:
rr: fix from header access
get_from() can be used _only_ if parse_from_header() returned
success or if msg->from!=0.
Revision Changes Path
1.53 +3 -3 sip_router/modules/rr/loose.c
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/modules/rr/loose.c…
Module: sip-router
Branch: master
Commit: ad12d90508ef5f896ef0327362971cd9afba81f2
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ad12d90…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Jul 13 22:40:33 2009 +0200
sercmd: updated to the new mi_rpc format
- updated to the new mi output format
- support for tab completion for mi_dg, mi_fifo and mi_xmlrpc
---
utils/sercmd/sercmd.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/utils/sercmd/sercmd.c b/utils/sercmd/sercmd.c
index 0c26d9e..9c9edf0 100644
--- a/utils/sercmd/sercmd.c
+++ b/utils/sercmd/sercmd.c
@@ -314,6 +314,9 @@ char* complete_params_cfg_var[]={
/* commands for which we complete the first param with an mi command*/
char* complete_params_mi[]={
"mi",
+ "mi_fifo",
+ "mi_dg",
+ "mi_xmlrpc",
0
};
#endif /* USE_MI */
@@ -1423,10 +1426,10 @@ static int get_mi_list(int s)
for (r=0; r<mi_which_no; r++){
if (mi_which_array[r].type!=BINRPC_T_STR)
continue;
- /* we are interestend only in lines starting with '+', e.g.:
- + :: version */
+ /* we are interestend only in lines starting with ':', e.g.:
+ :: version */
if ((mi_which_array[r].u.strval.len) &&
- (mi_which_array[r].u.strval.s[0]=='+'))
+ (mi_which_array[r].u.strval.s[0]==':'))
mi_which_results++;
}
/* no mi commands */
@@ -1442,29 +1445,26 @@ static int get_mi_list(int s)
continue;
p=mi_which_array[r].u.strval.s;
end=p+mi_which_array[r].u.strval.len;
- /* we are interestend only in lines starting with '+', e.g.:
- + :: version */
- if ((p>=end) || (*p!='+'))
+ /* we are interestend only in lines starting with ':', e.g.:
+ :: version */
+ if ((p>=end) || (*p!=':'))
continue;
p++;
- /* skip over to the first ':' */
- for(;p<end && *p!=':'; p++);
- if (p>=end) continue;
- p++;
/* skip over to the next ':' */
for(;p<end && *p!=':'; p++);
if (p>=end) continue;
p++;
/* skip over spaces */
for(;p<end && (*p==' ' || *p=='\t'); p++);
- if (p>=end) continue;
+ if (p>=end || *p=='\n') continue;
if (mi_cmds_no >= mi_which_results){
fprintf(stderr, "BUG: wrong mi cmds no (%d >= %d)\n",
mi_cmds_no, mi_which_results);
goto error;
}
mi_name.s=p;
- mi_name.len=(int)(long)(end-p);
+ for(; p<end && *p!=' ' && *p!='\t' && *p!='\n'; p++);
+ mi_name.len=(int)(long)(p-mi_name.s);
mi_cmds[mi_cmds_no]=mi_name;
mi_cmds_no++;
}