[Asterisk-code-review] RTP/ICE: Send on first valid pair. (asterisk[16])

Kevin Harwell asteriskteam at digium.com
Fri Feb 7 09:36:18 CST 2020


Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13673 )

Change subject: RTP/ICE: Send on first valid pair.
......................................................................


Patch Set 4: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/c/asterisk/+/13673/4/configure.ac 
File configure.ac:

https://gerrit.asterisk.org/c/asterisk/+/13673/4/configure.ac@2442 
PS4, Line 2442: 
              :       AC_MSG_CHECKING(for pjproject on_valid_pair callback)
              :       AC_LINK_IFELSE(
              :          [AC_LANG_PROGRAM(
              :             [#include <pjsip.h>
              :             #include <pjsip_ua.h>
              :             #include <pjnath.h>
              :             void on_valid_pair(pj_ice_sess *ice) {}
              :             void on_ice_complete(pj_ice_sess *ice, pj_status_t status) {}
              :             void on_rx_data(pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, void *pkt, pj_size_t size, const pj_sockaddr_t *src_addr, unsigned src_addr_len) {}
              :             pj_status_t on_tx_pkt(pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, const void *pkt, pj_size_t size, const pj_sockaddr_t *dst_addr, unsigned dst_addr_len) {}],
              :             [pj_ice_sess_cb ice_sess_cb = {
              :             .on_valid_pair = on_valid_pair,
              :             .on_ice_complete = on_ice_complete,
              :             .on_rx_data = on_rx_data,
              :             .on_tx_pkt = on_tx_pkt,
              :          };])],
              :       AC_MSG_RESULT(yes)
              :       AC_DEFINE(HAVE_PJPROJECT_ON_VALID_PAIR, 1, [Define to 1 if on_valid_pair callback is present.]),
              :       AC_MSG_RESULT(no)
              :    )
              :    fi
              : 
              : fi
Do we not already, or is there no way to get the pjproject version number and use that instead?

If we used the version number moving forward we would not have to keep adding in these "special" checks, but could just use the version number. Plus then looking in the code we'd know exactly what version the stuff was added in.

I can see advantages for both (the way you have it here, and just using the version number), but I think I lean toward using the version number if it's easily obtainable.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13673
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ia7b68c34f06d2a1d91c5ed51627b66fd0363d867
Gerrit-Change-Number: 13673
Gerrit-PatchSet: 4
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Fri, 07 Feb 2020 15:36:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200207/618a8986/attachment-0001.html>


More information about the asterisk-code-review mailing list