Module: kamailio
Branch: master
Commit: 8bab711590ac8b4fd73efabbc7c22be3231e6214
URL: https://github.com/kamailio/kamailio/commit/8bab711590ac8b4fd73efabbc7c22be…
Author: Bastian Triller <bastian.triller(a)gmail.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-04-11T15:52:36+02:00
core: Fix typos, reference to SER
---
Modified: src/core/str.h
Modified: src/core/ut.c
Modified: src/core/ut.h
---
Diff: https://github.com/kamailio/kamailio/commit/8bab711590ac8b4fd73efabbc7c22be…
Patch: https://github.com/kamailio/kamailio/commit/8bab711590ac8b4fd73efabbc7c22be…
---
diff --git a/src/core/str.h b/src/core/str.h
index d7977652d9..063a9e9398 100644
--- a/src/core/str.h
+++ b/src/core/str.h
@@ -143,7 +143,7 @@ typedef struct _str str;
} while(0)
/**
- * str with value: not null and not emptu
+ * str with value: not null and not empty
*/
#define STR_WITHVAL(_sp) ((_sp) && ((_sp)->s) && ((_sp)->len))
diff --git a/src/core/ut.c b/src/core/ut.c
index 8dde51aaff..a581f98e9f 100644
--- a/src/core/ut.c
+++ b/src/core/ut.c
@@ -97,7 +97,7 @@ int group2gid(int* gid, char* group)
/*
- * Replacement of timegm (does not exists on all platforms
+ * Replacement of timegm (does not exists on all platforms)
* Taken from
* http://lists.samba.org/archive/samba-technical/2002-November/025737.html
*/
@@ -232,7 +232,7 @@ unsigned int get_sys_version(int* major, int* minor, int* minor2)
/** transform a relative pathname into an absolute one.
* @param base - base file, used to extract the absolute path prefix.
- * Might be NULL, in which case the path of the ser.cfg is
+ * Might be NULL, in which case the path of the kamailio.cfg is
* used.
* @param file - file path to be transformed. If it's already absolute
* (starts with '/') is left alone. If not the result will
@@ -301,7 +301,7 @@ char* get_abs_pathname(str* base, str* file)
/**
- * @brief search for occurence of needle in text
+ * @brief search for occurrence of needle in text
* @return pointer to start of needle in text or NULL if the needle
* is not found
*/
@@ -323,7 +323,7 @@ char *str_search(str *text, str *needle)
}
/**
- * @brief search for occurence of needlez starting from vstart and before vend
+ * @brief search for occurrence of needlez starting from vstart and before vend
* @return pointer to start of needle in text or NULL if the needle
* is not found
*/
@@ -346,7 +346,7 @@ char *stre_search_strz(char *vstart, char *vend, char *needlez)
}
/**
- * @brief case insensitive search for occurence of needle in text
+ * @brief case insensitive search for occurrence of needle in text
* @return pointer to start of needle in text or NULL if the needle
* is not found
*/
@@ -393,7 +393,7 @@ char *str_casesearch_strz(str *text, char *needlez)
}
/**
- * @brief search for last occurence of needle in text (reverse search)
+ * @brief search for last occurrence of needle in text (reverse search)
* @return pointer to start of needle in text or NULL if the needle
* is not found
*/
@@ -415,7 +415,7 @@ char *str_rsearch(str *text, str *needle)
}
/**
- * @brief case insensitive search for last occurence of needle in text (reverse search)
+ * @brief case insensitive search for last occurrence of needle in text (reverse search)
* @return pointer to start of needle in text or NULL if the needle
* is not found
*/
diff --git a/src/core/ut.h b/src/core/ut.h
index 44bd0e75c7..7792a865ef 100644
--- a/src/core/ut.h
+++ b/src/core/ut.h
@@ -729,7 +729,7 @@ static inline int str2int(str* _s, unsigned int* _r)
/*
- * Convert an str to signed long
+ * Convert a str to signed long
*/
static inline int str2slong(str* _s, long* _r)
{
@@ -738,7 +738,7 @@ static inline int str2slong(str* _s, long* _r)
/*
- * Convert an str to signed integer
+ * Convert a str to signed integer
*/
static inline int str2sint(str* _s, int* _r)
{
@@ -747,7 +747,7 @@ static inline int str2sint(str* _s, int* _r)
/*
- * Convert an strz to integer
+ * Convert a strz to integer
*/
static inline int strz2int(char* _s, unsigned int* _r)
{
@@ -770,7 +770,7 @@ static inline int strz2int(char* _s, unsigned int* _r)
}
/*
- * Convert an strz to signed integer
+ * Convert a strz to signed integer
*/
static inline int strz2sint(char* _s, int* _r)
{
- To be used with headers containing values separated by commas
- pvh_header_param_exists() check if the value is present to a given header
- pvh_remove_header_param() remove the value from the given header or the entire header if no other value is present
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [X] Commit message has the format required by CONTRIBUTING guide
- [X] Commits are split per component (core, individual modules, libs, utils, ...)
- [X] Each component has a single commit (if not, squash them into one commit)
- [X] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Previously, to remove a parameter from a header it was needed to create a complex method on the configuration file for each header/parameter. This modification moves this complexity to the 'pv_headers' module.
Two new functions:
* pvh_header_param_exists
* pvh_remove_header_param
Both functions take as parameters the name of the header and the name of the parameter.
It returns '-1' if the combination header/parameter:
- is not found (pvh_header_param_exists)
- couldn't be removed (pvh_remove_header_param).
Examples (proxy configuration):
if (pvh_header_param_exists("Supported", "100rel"))
{
// "100rel" is present on the "Supported" header
}
if (pvh_remove_header_param("Supported", "100rel"))
{
// "100rel" removed from header "Supported"
}
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3070
-- Commit Summary --
* pv_headers: Add support to remove a specific value from a header
-- File Changes --
M src/modules/pv_headers/doc/functions.xml (35)
M src/modules/pv_headers/doc/pv_headers.xml (6)
M src/modules/pv_headers/pv_headers.c (61)
M src/modules/pv_headers/pvh_func.c (87)
M src/modules/pv_headers/pvh_func.h (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3070.patchhttps://github.com/kamailio/kamailio/pull/3070.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3070
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3070(a)github.com>
Module: kamailio
Branch: master
Commit: 7a3f71e7ce6b63fe1c32853c30d785bc9c1f2236
URL: https://github.com/kamailio/kamailio/commit/7a3f71e7ce6b63fe1c32853c30d785b…
Author: Fabricio Santolin da Silva <fabricio.santolin-da-silva(a)al-enterprise.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2022-04-11T15:10:11+02:00
pv_headers: Add support to remove a specific value from a header
- To be used with headers containing values separated by commas
- pvh_header_param_exists() check if the value is present to a given header
- pvh_remove_header_param() remove the value from the given header or the entire header if no other value is present
---
Modified: src/modules/pv_headers/doc/functions.xml
Modified: src/modules/pv_headers/doc/pv_headers.xml
Modified: src/modules/pv_headers/pv_headers.c
Modified: src/modules/pv_headers/pvh_func.c
Modified: src/modules/pv_headers/pvh_func.h
---
Diff: https://github.com/kamailio/kamailio/commit/7a3f71e7ce6b63fe1c32853c30d785b…
Patch: https://github.com/kamailio/kamailio/commit/7a3f71e7ce6b63fe1c32853c30d785b…
I check the codes and it seems that in `udp_rcv_loop()`, each incoming message got processed in the same process, so may it get blocked by some module function? For example, when the script calls `rtpengine_manage()`, it opens a new socket, sends a message, and receives the reply in blocking way, then it blocks the whole `udp_rcv_loop()`. Is it the expected design goal? why not consider new process or threading?
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3075
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3075(a)github.com>