THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#133 - kamailio 3.1.3 Presence + XCAP problem, is it a bug?
User who did this - Daniel-Constantin Mierla (miconda)
----------
Can you send the unified diff, ie., taken as:
diff -u presence.c.orig presence.c.patch
Is it for v3.1.x or devel?
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=133#comment235
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 has a new comment added:
FS#136 - tcp_async=yes breaks connect_timeout (no effect) and TCP reject detection
User who did this - Iñaki Baz Castillo (ibc)
----------
Comment by Andrei Pelinescu in the devel maillist:
Yes, it's a known limitation. Basically when async it's own, tm has no way of knowing that a connect() has failed and would have to rely on sip timeout.
Of course these could be changed, but it would have both performance and memory usage impact and it would be very hard to integrate with tls. I would rather not do it in the near future.
The tcp_connect_timeout refers to how long the tcp connect will be attempted, but it's not linked to tm. The value is not 100% exact, the tcp timers are executed on a best effort basis, at most at 5s intervals and at minimum 1/16 seconds, so you should expect a 5s error If it's too much for you, change TCP_MAIN_SELECT_TIMEOUT and TCP_CHILD_SELECT_TIMEOUT in tcp_conn.h (btw. we don't use select() anymore, the names where not updated when we switched to
epoll/kqueue/dev_poll).
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=136#comment234
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.
Daniel wrote:
> Module: sip-router
> Branch: master
> Commit: 13de789c655b2b5da47a9982fe19fef386265dc2
> URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=13de789…
>
> core: new preprocessor directives: trydef and redef
>
> - #!trydef - don't define if it is already done
> - #!redef - redefine even already defined
> - both have the prototype like #!define
Hello Daniel,
looks interesting. :-) Just one question, have you thought about using something like in the C cpp
language, instead of adding two more keywords to our grammar? E.g. something like this:
- trydef
#!ifndef foo
#!define foo "bar"
- redef
#!define foo "bar"
# foo == bar
#...
#!define foo "bar2
# foo == bar2
Best regards,
Henning
Module: sip-router
Branch: master
Commit: 71bfc3f3c1b22ff6f06c0b1fcafc4d6a75abd66b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=71bfc3f…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Tue Jul 5 23:50:10 2011 +0200
tm: delete obselete uri2sock function, its not compiled since almost 5 years
---
modules/tm/ut.h | 34 ----------------------------------
1 files changed, 0 insertions(+), 34 deletions(-)
diff --git a/modules/tm/ut.h b/modules/tm/ut.h
index 4ca2751..3aa829a 100644
--- a/modules/tm/ut.h
+++ b/modules/tm/ut.h
@@ -386,38 +386,4 @@ inline static struct dest_info *uri2dst(struct dest_info* dst,
}
#endif /* USE_DNS_FAILOVER */
-
-
-#if 0
-/*
- * Convert a URI into the corresponding sockaddr_union (address to send to) and
- * send socket_info (socket/address from which to send)
- * to_su is filled with the destination and the socket_info that will be
- * used for sending is returned.
- * On error return 0.
- *
- * NOTE: this function is deprecated, you should use uri2dst instead
- */
-static inline struct socket_info *uri2sock(struct sip_msg* msg, str *uri,
- union sockaddr_union *to_su, int proto)
-{
- struct dest_info dst;
-
- if (uri2dst(&dst, msg, uri, proto)==0){
- LOG(L_ERR, "ERROR: uri2sock: Can't create a dst proxy\n");
- ser_error=E_BAD_ADDRESS;
- return 0;
- }
- *to_su=dst.to; /* copy su */
-
- /* we use dst->send_socket since uri2dst just set it correctly*/
- if (dst.send_sock==0) {
- LOG(L_ERR, "ERROR: uri2sock: no corresponding socket for af %d\n",
- to_su->s.sa_family);
- ser_error = E_NO_SOCKET;
- }
- return dst.send_sock;
-}
-#endif
-
#endif /* _TM_UT_H */
Module: sip-router
Branch: master
Commit: b1c80706eb428423d9c39796be5d4218d78ce06f
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b1c8070…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Tue Jul 5 23:38:13 2011 +0200
core: move redundant and identical implementation of a str_list type to core
- move redundant str_list and new_str implementations from tm and tmx to core
- rename new_str to a more descriptive append_str_list, no interface changes
- fix callers in tm and tmx
- add doxygen documentation
---
modules/tm/rpc_uac.c | 37 +++++--------------------------
modules_k/tmx/t_mi.c | 47 ++++++---------------------------------
str_list.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++
str_list.h | 54 +++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 126 insertions(+), 71 deletions(-)
diff --git a/modules/tm/rpc_uac.c b/modules/tm/rpc_uac.c
index 34f7c36..f1458a1 100644
--- a/modules/tm/rpc_uac.c
+++ b/modules/tm/rpc_uac.c
@@ -29,6 +29,7 @@
#include "../../socket_info.h"
#include "../../ut.h"
#include "../../parser/parse_from.h"
+#include "../../str_list.h"
#include "ut.h"
#include "dlg.h"
#include "uac.h"
@@ -50,13 +51,6 @@
-struct str_list {
- str s;
- struct str_list *next;
-};
-
-
-
/** make sure the rpc user created the msg properly.
* Make sure that the FIFO user created the message
* correctly and fill some extra parameters in function
@@ -151,25 +145,6 @@ err:
-static inline struct str_list *new_str(char *s, int len,
- struct str_list **last, int *total)
-{
- struct str_list *new;
- new = pkg_malloc(sizeof(struct str_list));
- if (!new) {
- LOG(L_ERR, "new_str: Not enough mem\n");
- return 0;
- }
- new->s.s = s;
- new->s.len = len;
- new->next = 0;
-
- (*last)->next = new;
- *last = new;
- *total += len;
- return new;
-}
-
/** construct a "header block" from a header list.
@@ -208,7 +183,7 @@ static char *get_hfblock(str *uri, struct hdr_field *hf, int proto,
while(p) {
d = q_memchr(needle, SUBST_CHAR, p);
if (!d || d + 1 >= needle + p) { /* nothing to substitute */
- if (!new_str(begin, p, &last, &total_len)) goto error;
+ if (!append_str_list(begin, p, &last, &total_len)) goto error;
break;
} else {
frag_len = d - begin;
@@ -216,7 +191,7 @@ static char *get_hfblock(str *uri, struct hdr_field *hf, int proto,
switch(*d) {
case SUBST_CHAR: /* double SUBST_CHAR: IP */
/* string before substitute */
- if (!new_str(begin, frag_len, &last, &total_len))
+ if (!append_str_list(begin, frag_len, &last, &total_len))
goto error;
/* substitute */
if (!sock_name) {
@@ -234,12 +209,12 @@ static char *get_hfblock(str *uri, struct hdr_field *hf, int proto,
sock_name = &di.send_sock->address_str;
portname = &di.send_sock->port_no_str;
}
- if (!new_str(sock_name->s, sock_name->len, &last,
+ if (!append_str_list(sock_name->s, sock_name->len, &last,
&total_len))
goto error;
/* inefficient - FIXME --andrei*/
- if (!new_str(":", 1, &last, &total_len)) goto error;
- if (!new_str(portname->s, portname->len, &last,
+ if (!append_str_list(":", 1, &last, &total_len)) goto error;
+ if (!append_str_list(portname->s, portname->len, &last,
&total_len)) goto error;
/* keep going ... */
begin = needle = d + 1;
diff --git a/modules_k/tmx/t_mi.c b/modules_k/tmx/t_mi.c
index 973061e..e784bf6 100644
--- a/modules_k/tmx/t_mi.c
+++ b/modules_k/tmx/t_mi.c
@@ -38,13 +38,9 @@
#include "../../parser/parse_from.h"
#include "../../modules/tm/ut.h"
#include "../../lib/kmi/mi.h"
+#include "../../str_list.h"
#include "tmx_mod.h"
-/*! simple string list */
-struct str_list {
- str s;
- struct str_list *next;
-};
/*! Which header fields should be skipped */
#define skip_hf(_hf) \
@@ -160,35 +156,6 @@ static inline struct mi_root* mi_check_msg(struct sip_msg* msg, str* method,
return 0;
}
-/*!
- * \brief Allocate a new str on a str list
- *
- * Allocate a new str in pkg_mem and attach it to a str list. Update
- * the total number of list elements.
- * \param s char array
- * \param len length of the char array
- * \param last last list element
- * \param total total number of list elements
- * \return pointer to the new list element
- */
-static inline struct str_list *new_str(char *s, int len, struct str_list **last, int *total)
-{
- struct str_list *new;
- new=pkg_malloc(sizeof(struct str_list));
- if (!new) {
- LM_ERR("no more pkg mem\n");
- return 0;
- }
- new->s.s=s;
- new->s.len=len;
- new->next=0;
-
- (*last)->next=new;
- *last=new;
- *total+=len;
-
- return new;
-}
/*!
* \brief Convert a header field block to char array
@@ -225,7 +192,7 @@ static inline char *get_hfblock( str *uri, struct hdr_field *hf, int *l, struct
while(hf_avail) {
d=memchr(needle, SUBST_CHAR, hf_avail);
if (!d || d+1>=needle+hf_avail) { /* nothing to substitute */
- new=new_str(begin, hf_avail, &last, &total_len);
+ new=append_str_list(begin, hf_avail, &last, &total_len);
if (!new) goto error;
break;
} else {
@@ -234,7 +201,7 @@ static inline char *get_hfblock( str *uri, struct hdr_field *hf, int *l, struct
switch(*d) {
case SUBST_CHAR: /* double SUBST_CHAR: IP */
/* string before substitute */
- new=new_str(begin, frag_len, &last, &total_len);
+ new=append_str_list(begin, frag_len, &last, &total_len);
if (!new) goto error;
/* substitute */
if (!sock_name) {
@@ -248,13 +215,13 @@ static inline char *get_hfblock( str *uri, struct hdr_field *hf, int *l, struct
sock_name=&(*send_sock)->address_str;
portname=&(*send_sock)->port_no_str;
}
- new=new_str(sock_name->s, sock_name->len,
+ new=append_str_list(sock_name->s, sock_name->len,
&last, &total_len );
if (!new) goto error;
/* inefficient - FIXME --andrei*/
- new=new_str(":", 1, &last, &total_len);
+ new=append_str_list(":", 1, &last, &total_len);
if (!new) goto error;
- new=new_str(portname->s, portname->len,
+ new=append_str_list(portname->s, portname->len,
&last, &total_len );
if (!new) goto error;
/* keep going ... */
@@ -268,7 +235,7 @@ static inline char *get_hfblock( str *uri, struct hdr_field *hf, int *l, struct
} /* possible substitute */
} /* substitution loop */
/* proceed to next header */
- /* new=new_str(CRLF, CRLF_LEN, &last, &total_len );
+ /* new=append_str_list(CRLF, CRLF_LEN, &last, &total_len );
if (!new) goto error; */
LM_DBG("one more hf processed\n");
} /* header loop */
diff --git a/str_list.c b/str_list.c
new file mode 100644
index 0000000..a51bffa
--- /dev/null
+++ b/str_list.c
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2001-2003 FhG Fokus
+ *
+ * This file is part of sip-router, a free SIP server.
+ *
+ * sip-router is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ * sip-router is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * 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
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/**
+ * @file
+ * @brief Simple str type list and helper functions
+ */
+
+
+#include "str.h"
+#include "mem/mem.h"
+#include "str_list.h"
+
+
+/**
+ * @brief Add a new allocated list element to an existing list
+ *
+ * Add a new allocated list element to an existing list, the allocation is done
+ * from the private memory pool
+ * @param s input character
+ * @param len length of input character
+ * @param last existing list
+ * @param total length of total characters in list
+ * @return extended list
+ */
+struct str_list *append_str_list(char *s, int len, struct str_list **last, int *total)
+{
+ struct str_list *new;
+ new = pkg_malloc(sizeof(struct str_list));
+ if (!new) {
+ PKG_MEM_ERROR;
+ return 0;
+ }
+ new->s.s = s;
+ new->s.len = len;
+ new->next = 0;
+
+ (*last)->next = new;
+ *last = new;
+ *total += len;
+ return new;
+}
diff --git a/str_list.h b/str_list.h
new file mode 100644
index 0000000..6373d68
--- /dev/null
+++ b/str_list.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2001-2003 FhG Fokus
+ * Copyright (C) 2006 Voice Sistem SRL
+ *
+ * This file is part of sip-router, a free SIP server.
+ *
+ * sip-router is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ * sip-router is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * 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
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/**
+ * @file
+ * @brief Simple str type list and helper functions
+ */
+
+
+#ifndef str_list_h
+#define str_list_h
+
+
+/**
+ * @brief Simple str type list
+ */
+struct str_list {
+ str s;
+ struct str_list *next;
+};
+
+
+/**
+ * @brief Add a new allocated list element to an existing list
+ *
+ * Add a new allocated list element to an existing list, the allocation is done
+ * from the private memory pool
+ * @param s input character
+ * @param len length of input character
+ * @param last existing list
+ * @param total length of total characters in list
+ * @return extended list
+ */
+struct str_list *append_str_list(char *s, int len, struct str_list **last, int *total);
+
+#endif
Job offer:
Interested in working with one of the biggest Voice over IP networks in
europe? We're hiring and have one additional IT operation position open in
our team in Karlsruhe, Germany at the moment. You would be responsible in
a team of motivated system administrators for the operation and maintenance
of the VoIP kamailio backend at 1&1, providing services for more than three
million customers.
You should have some experience in operating or developing Voice over IP
services with kamailio, asterisk or others similar servers. Additionally you
should be able to communicate professionally in the german language. For more
informations please contact me directly by email.
Best regards,
Henning Westerholt
--
Henning Westerholt - Head of IT Operations Internet Access & Communications
1&1 Internet AG, Brauerstraße 48, 76135 Karlsruhe, Germany