Module: kamailio Branch: master Commit: 09c5e6069aaeed472d1d4e4088d14551d90f90a9 URL: https://github.com/kamailio/kamailio/commit/09c5e6069aaeed472d1d4e4088d14551...
Author: Olle E. Johansson oej@edvina.net Committer: Olle E. Johansson oej@edvina.net Date: 2015-10-01T22:07:07+03:00
tcpops Add tcp_conid_state function to check connection state
---
Modified: modules/tcpops/README Modified: modules/tcpops/doc/functions.xml Modified: modules/tcpops/doc/tcpops.xml Modified: modules/tcpops/tcpops_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/09c5e6069aaeed472d1d4e4088d14551... Patch: https://github.com/kamailio/kamailio/commit/09c5e6069aaeed472d1d4e4088d14551...
Committed a first version. I can test good and bad connections - but not really force any other states. How would I test ACCEPT and CONNECT? Or bad stuff?
Hmmm.
It’s in there anyway.
/O
On 01 Oct 2015, at 22:07, Olle E. Johansson oej@edvina.net wrote:
Module: kamailio Branch: master Commit: 09c5e6069aaeed472d1d4e4088d14551d90f90a9 URL: https://github.com/kamailio/kamailio/commit/09c5e6069aaeed472d1d4e4088d14551...
Author: Olle E. Johansson oej@edvina.net Committer: Olle E. Johansson oej@edvina.net Date: 2015-10-01T22:07:07+03:00
tcpops Add tcp_conid_state function to check connection state
Modified: modules/tcpops/README Modified: modules/tcpops/doc/functions.xml Modified: modules/tcpops/doc/tcpops.xml Modified: modules/tcpops/tcpops_mod.c
Diff: https://github.com/kamailio/kamailio/commit/09c5e6069aaeed472d1d4e4088d14551... Patch: https://github.com/kamailio/kamailio/commit/09c5e6069aaeed472d1d4e4088d14551...
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
I pushed two commits, because yours was resulting in compile errors due to different name in declaration of the function prototype. Then I noticed that the connection was not released after it was looked up. I hope I haven't broken other stuff.
On the other hand, an explicit function to use when needing to test if connection is ok could me more user friendly than handling all the return codes. So adding one may worth the trouble for few more lines of code.
Cheers, Daniel
On 01/10/15 21:10, Olle E. Johansson wrote:
Committed a first version. I can test good and bad connections - but not really force any other states. How would I test ACCEPT and CONNECT? Or bad stuff?
Hmmm.
It’s in there anyway.
/O
On 01 Oct 2015, at 22:07, Olle E. Johansson oej@edvina.net wrote:
Module: kamailio Branch: master Commit: 09c5e6069aaeed472d1d4e4088d14551d90f90a9 URL: https://github.com/kamailio/kamailio/commit/09c5e6069aaeed472d1d4e4088d14551...
Author: Olle E. Johansson oej@edvina.net Committer: Olle E. Johansson oej@edvina.net Date: 2015-10-01T22:07:07+03:00
tcpops Add tcp_conid_state function to check connection state
Modified: modules/tcpops/README Modified: modules/tcpops/doc/functions.xml Modified: modules/tcpops/doc/tcpops.xml Modified: modules/tcpops/tcpops_mod.c
Diff: https://github.com/kamailio/kamailio/commit/09c5e6069aaeed472d1d4e4088d14551... Patch: https://github.com/kamailio/kamailio/commit/09c5e6069aaeed472d1d4e4088d14551...
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On 01 Oct 2015, at 23:07, Daniel-Constantin Mierla miconda@gmail.com wrote:
I pushed two commits, because yours was resulting in compile errors due to different name in declaration of the function prototype. Then I noticed that the connection was not released after it was looked up. I hope I haven't broken other stuff.
Thanks. Changed the name in last minute based on suggestions, but wasn’t awake enough to really test again… Ouch.
On the other hand, an explicit function to use when needing to test if connection is ok could me more user friendly than handling all the return codes.
So adding one may worth the trouble for few more lines of code.
You mean adding my original idea of a function with just true/false checks? I can do that.
/O
Cheers, Daniel
On 01/10/15 21:10, Olle E. Johansson wrote:
Committed a first version. I can test good and bad connections - but not really force any other states. How would I test ACCEPT and CONNECT? Or bad stuff?
Hmmm.
It’s in there anyway.
/O
On 01 Oct 2015, at 22:07, Olle E. Johansson oej@edvina.net wrote:
Module: kamailio Branch: master Commit: 09c5e6069aaeed472d1d4e4088d14551d90f90a9 URL: https://github.com/kamailio/kamailio/commit/09c5e6069aaeed472d1d4e4088d14551...
Author: Olle E. Johansson oej@edvina.net Committer: Olle E. Johansson oej@edvina.net Date: 2015-10-01T22:07:07+03:00
tcpops Add tcp_conid_state function to check connection state
Modified: modules/tcpops/README Modified: modules/tcpops/doc/functions.xml Modified: modules/tcpops/doc/tcpops.xml Modified: modules/tcpops/tcpops_mod.c
Diff: https://github.com/kamailio/kamailio/commit/09c5e6069aaeed472d1d4e4088d14551... Patch: https://github.com/kamailio/kamailio/commit/09c5e6069aaeed472d1d4e4088d14551...
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - http://asipto.com/u/kat
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On 02/10/15 07:16, Olle E. Johansson wrote:
On 01 Oct 2015, at 23:07, Daniel-Constantin Mierla miconda@gmail.com wrote:
I pushed two commits, because yours was resulting in compile errors due to different name in declaration of the function prototype. Then I noticed that the connection was not released after it was looked up. I hope I haven't broken other stuff.
Thanks. Changed the name in last minute based on suggestions, but wasn’t awake enough to really test again… Ouch.
On the other hand, an explicit function to use when needing to test if connection is ok could me more user friendly than handling all the return codes. So adding one may worth the trouble for few more lines of code.
You mean adding my original idea of a function with just true/false checks? I can do that.
Yes, a function to just say true if the connection is alive, that's what I expect to be the common use case. Accepting and connecting states are not for the connections that already received a register packet, but the existion function is returning true, if some one wants to use a simple if(...).
Cheers, Daniel
On 02 Oct 2015, at 09:42, Daniel-Constantin Mierla miconda@gmail.com wrote:
On 02/10/15 07:16, Olle E. Johansson wrote:
On 01 Oct 2015, at 23:07, Daniel-Constantin Mierla miconda@gmail.com wrote:
I pushed two commits, because yours was resulting in compile errors due to different name in declaration of the function prototype. Then I noticed that the connection was not released after it was looked up. I hope I haven't broken other stuff.
Thanks. Changed the name in last minute based on suggestions, but wasn’t awake enough to really test again… Ouch.
On the other hand, an explicit function to use when needing to test if connection is ok could me more user friendly than handling all the return codes. So adding one may worth the trouble for few more lines of code.
You mean adding my original idea of a function with just true/false checks? I can do that.
Yes, a function to just say true if the connection is alive, that's what I expect to be the common use case. Accepting and connecting states are not for the connections that already received a register packet, but the existion function is returning true, if some one wants to use a simple if(...).
Will fix. That was my original function :-)
I also want to add a function that determines if the TCP connection is inbound or outbound.
/O