Module: kamailio
Branch: master
Commit: 59eddb54d200e29041c3606f66524ac1d88a8ebc
URL: 
https://github.com/kamailio/kamailio/commit/59eddb54d200e29041c3606f66524ac1d88a8ebc

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2026-05-15T10:05:59+02:00

rtpproxy: remove duplicated function ser_memmem()

- same as the one in core and already available via included headers

---

Modified: src/modules/rtpproxy/rtpproxy_funcs.c
Modified: src/modules/rtpproxy/rtpproxy_funcs.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/59eddb54d200e29041c3606f66524ac1d88a8ebc.diff
Patch: 
https://github.com/kamailio/kamailio/commit/59eddb54d200e29041c3606f66524ac1d88a8ebc.patch

---

diff --git a/src/modules/rtpproxy/rtpproxy_funcs.c 
b/src/modules/rtpproxy/rtpproxy_funcs.c
index 671e44759c2..762af6df19d 100644
--- a/src/modules/rtpproxy/rtpproxy_funcs.c
+++ b/src/modules/rtpproxy/rtpproxy_funcs.c
@@ -269,37 +269,6 @@ int extract_body(struct sip_msg *msg, str *body)
        return 1;
 }
 
-/*
- * ser_memmem() returns the location of the first occurrence of data
- * pattern b2 of size len2 in memory block b1 of size len1 or
- * NULL if none is found. Obtained from NetBSD.
- */
-void *ser_memmem(const void *b1, const void *b2, size_t len1, size_t len2)
-{
-       /* Initialize search pointer */
-       char *sp = (char *)b1;
-
-       /* Initialize pattern pointer */
-       char *pp = (char *)b2;
-
-       /* Initialize end of search address space pointer */
-       char *eos = sp + len1 - len2;
-
-       /* Sanity check */
-       if(!(b1 && b2 && len1 && len2))
-               return NULL;
-
-       while(sp <= eos) {
-               if(*sp == *pp)
-                       if(memcmp(sp, pp, len2) == 0)
-                               return sp;
-
-               sp++;
-       }
-
-       return NULL;
-}
-
 /*
  * Some helper functions taken verbatim from tm module.
  */
diff --git a/src/modules/rtpproxy/rtpproxy_funcs.h 
b/src/modules/rtpproxy/rtpproxy_funcs.h
index aae4116947e..f96bf806333 100644
--- a/src/modules/rtpproxy/rtpproxy_funcs.h
+++ b/src/modules/rtpproxy/rtpproxy_funcs.h
@@ -30,7 +30,6 @@
 
 int extract_body(struct sip_msg *, str *);
 int check_content_type(struct sip_msg *);
-void *ser_memmem(const void *, const void *, size_t, size_t);
 int get_callid(struct sip_msg *, str *);
 int get_to_tag(struct sip_msg *, str *);
 int get_from_tag(struct sip_msg *, str *);

_______________________________________________
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!

Reply via email to