@henningw commented on this pull request.
Thanks for the PR, just a few smaller remarks from my side.
> @@ -1,5 +1,5 @@
<?xml version="1.0" encoding='ISO-8859-1'?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
Why you changed from book to chapter type here? Type book is used in 99% of all
places.
> @@ -6,6 +6,9 @@
<!ENTITY % docentities SYSTEM "../../../../doc/docbook/entities.xml">
%docentities;
+<!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod" >
Why you added this? Its not used elsewhere.
> @@ -503,3 +518,137 @@ int bind_ob(struct ob_binds *pxb)
return 0;
}
+
+/*!
+ * \brief Check if URI is myself
+ * \param _host host
+ * \param _port port
+ * \return 0 if the URI is not myself, 1 otherwise
+ */
+static inline int is_myself(sip_uri_t *_puri)
More a note - it might make sense to move this to the core, or to expose it
with the RR module API, as its duplicated in some modules already. Could be
also done later if necessary.
> +
+ if(ret == 1) {
+ /* match on host:port, but if gruu, then fail */
+ if(_puri->gr.s != NULL)
+ return 0;
+ }
+
+ return ret;
+}
+
+/*!
+ * \brief Parse the message and find first occurrence of Route header field.
+ * \param _m SIP message
+ * \return -1 or -2 on a parser error, 0 if there is a Route HF and 1 if there
is no Route HF
+ */
+static inline int find_first_route(struct sip_msg *_m)
More a note - it might make sense to move this to the core, or to expose it
with the RR module API, as its duplicated in some modules already. Could be
also done later if necessary.
> + return CHECK_FLOW_ERROR_URI_NOT_MYSELF;
+ }
+
+
+ LM_DBG("topmost route URI: '%.*s' is me\n", uri.len, ZSW(uri.s));
+ ret = decode_flow_token(msg, &rcv, puri.user);
+
+ if(ret == -2) {
+ LM_DBG("no flow token found\n");
+ return CHECK_FLOW_ERROR_NO_FLOW_TOKEN;
+ } else if(ret == -1) {
+ LM_DBG("failed to decode flow token\n");
+ return CHECK_FLOW_ERROR_DECODE;
+ } else if(rcv->proto == PROTO_TCP || rcv->proto == PROTO_TLS
+ || rcv->proto == PROTO_WS || rcv->proto == PROTO_WSS)
{
+ tcp_connection_t *con =
Please move variable initialization to the beginning of the function.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4449#pullrequestreview-3382456348
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4449/review/[email protected]>_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!