Module: sip-router
Branch: master
Commit: 6d263c0c6152fea5991f02a26f24a6488e94c73b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6d263c0…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Sep 21 18:39:41 2009 +0200
tcp: remember which connections were accepted
Use a new flag to remember which connection were passively opened
(accept()) and which were locally initiated (connect).
---
tcp_conn.h | 1 +
tcp_main.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tcp_conn.h b/tcp_conn.h
index 5338734..f596b59 100644
--- a/tcp_conn.h
+++ b/tcp_conn.h
@@ -75,6 +75,7 @@
#define F_CONN_WR_ERROR 2048 /* write error on the fd */
#define F_CONN_WANTS_RD 4096 /* conn. should be watched for READ */
#define F_CONN_WANTS_WR 8192 /* conn. should be watched for WRITE */
+#define F_CONN_PASSIVE 16384 /* conn. created via accept() and not connect()*/
enum tcp_req_errors { TCP_REQ_INIT, TCP_REQ_OK, TCP_READ_ERROR,
diff --git a/tcp_main.c b/tcp_main.c
index d2f7b59..0164d22 100644
--- a/tcp_main.c
+++ b/tcp_main.c
@@ -3433,6 +3433,7 @@ static inline int handle_new_connect(struct socket_info* si)
/* add socket to list */
tcpconn=tcpconn_new(new_sock, &su, dst_su, si, si->proto, S_CONN_ACCEPT);
if (likely(tcpconn)){
+ tcpconn->flags|=F_CONN_PASSIVE;
#ifdef TCP_PASS_NEW_CONNECTION_ON_DATA
atomic_set(&tcpconn->refcnt, 1); /* safe, not yet available to the
outside world */
Hello,
I just committed a new function in modules_k/textops -
msg_apply_changes(). Hopefully the name is suggestive enough - the
function applies the changes done to the content of sip message - e.g.,
if you added a new header, once you use the function, that header will
become visible in config file.
Therefore the function tries to overcome the overhead of looping various
messages back to sip server just because modifications were not visible
once done. Another benefit is ability to access latest value for a field
(being header or body content) in case of need to hashes or signatures
for security purposes.
The function can be used only in request route for now. Be carefully
when using it, since it changes the expectation you had so far of always
working on initially received sip message. Once the function is sued,
initial content is lost forever. Since it builds a new buffer and
re-parses, it is not very recommended to use it extensively.
Example of usage:
append_hf("My-Header: yes\r\n");
if(msg_apply_changes())
{
# msg buffer has a new content
if(is_present_hf("My-Header"))
{
# will get always here
}
}
Testing and feedback is welcome!
Cheers,
Daniel
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#16 - Local 487 forwarded upstream
User who did this - Andrei Pelinescu-Onciul (andrei)
----------
I think that the 487 on branch 3 arrives after the transaction has been deleted.
After the transaction gets the 200 on branch 1, it will be alive for 5 more s (or whatever value you have set for wt_timer).
So if the 487 on branch 3 comes more then 5 s after the 200 on branch 1, the transaction doesn't exist any more => the 487
is forwarded statelessly (which is correct behaviour).
If you have a pcap dump, I can check if this is the case and close the bug report (the log doesn't include the time).
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=16#comment7
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task is now closed:
FS#15 - Proto names are causing parser errors
User who did this - Andrei Pelinescu-Onciul (andrei)
Reason for closing: Fixed
Additional comments about closing: Thanks, fixed (see git#d29c95).
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=15
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task is now closed:
FS#17 - Makefile error prevent tls module from being build
User who did this - Andrei Pelinescu-Onciul (andrei)
Reason for closing: Fixed
Additional comments about closing: fixed, see git#ba3d64ff
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=17
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Module: sip-router
Branch: master
Commit: 8205f043c43282a209673364961d23c6b74cee72
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8205f04…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Sep 21 09:16:14 2009 +0200
tls mk cert script: typo fix
---
modules/tls/sip-router_cert.sh | 4 ++--
modules_s/tls/ser_cert.sh | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/tls/sip-router_cert.sh b/modules/tls/sip-router_cert.sh
index 4bfb8fc..df08caa 100755
--- a/modules/tls/sip-router_cert.sh
+++ b/modules/tls/sip-router_cert.sh
@@ -28,12 +28,12 @@ MAILNAME=`cat /etc/mailname 2> /dev/null || echo $FQDN`
# test if we have the normal or enhanced getopt
getopt -T >/dev/null
-if [ $? == 4 ]; then
+if [ $? = 4 ]; then
LONGOPTS_SUPPORTED=1
fi
longopts() {
- if [ -z "${LONGOPTS_SUPPORTED}"]; then
+ if [ -z "${LONGOPTS_SUPPORTED}" ]; then
exit;
fi
case "$1" in
diff --git a/modules_s/tls/ser_cert.sh b/modules_s/tls/ser_cert.sh
index 4bfb8fc..df08caa 100755
--- a/modules_s/tls/ser_cert.sh
+++ b/modules_s/tls/ser_cert.sh
@@ -28,12 +28,12 @@ MAILNAME=`cat /etc/mailname 2> /dev/null || echo $FQDN`
# test if we have the normal or enhanced getopt
getopt -T >/dev/null
-if [ $? == 4 ]; then
+if [ $? = 4 ]; then
LONGOPTS_SUPPORTED=1
fi
longopts() {
- if [ -z "${LONGOPTS_SUPPORTED}"]; then
+ if [ -z "${LONGOPTS_SUPPORTED}" ]; then
exit;
fi
case "$1" in