Module: kamailio
Branch: master
Commit: 9ee189883549faffb21d3ae113dafd7ad95757af
URL: 
https://github.com/kamailio/kamailio/commit/9ee189883549faffb21d3ae113dafd7ad95757af

Author: Victor Seva <[email protected]>
Committer: Victor Seva <[email protected]>
Date: 2024-10-22T16:45:35+02:00

pipelimit: use core str comparison functions

---

Modified: src/modules/pipelimit/pl_ht.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/9ee189883549faffb21d3ae113dafd7ad95757af.diff
Patch: 
https://github.com/kamailio/kamailio/commit/9ee189883549faffb21d3ae113dafd7ad95757af.patch

---

diff --git a/src/modules/pipelimit/pl_ht.h b/src/modules/pipelimit/pl_ht.h
index 8ee6568ea69..86eab1092dc 100644
--- a/src/modules/pipelimit/pl_ht.h
+++ b/src/modules/pipelimit/pl_ht.h
@@ -98,16 +98,6 @@ typedef struct str_map
 
 extern str_map_t algo_names[];
 
-static inline int str_cmp(const str *a, const str *b)
-{
-       return !(a->len == b->len && !strncmp(a->s, b->s, a->len));
-}
-
-static inline int str_i_cmp(const str *a, const str *b)
-{
-       return !(a->len == b->len && !strncasecmp(a->s, b->s, a->len));
-}
-
 /**
  * converts a mapped str to an int
  * \return     0 if found, -1 otherwise
@@ -115,7 +105,7 @@ static inline int str_i_cmp(const str *a, const str *b)
 static inline int str_map_str(const str_map_t *map, const str *key, int *ret)
 {
        for(; map->str.s; map++)
-               if(!str_i_cmp(&map->str, key)) {
+               if(!str_strcasecmp(&map->str, key)) {
                        *ret = map->id;
                        return 0;
                }

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to [email protected]

Reply via email to