Module: kamailio Branch: master Commit: 4910ddf9eebb8fa5106300b9e684ecb67fb2d225 URL: https://github.com/kamailio/kamailio/commit/4910ddf9eebb8fa5106300b9e684ecb6...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2016-03-15T12:40:47+01:00
tm: _strnstr() moved to core
---
Modified: modules/tm/t_msgbuilder.c
---
Diff: https://github.com/kamailio/kamailio/commit/4910ddf9eebb8fa5106300b9e684ecb6... Patch: https://github.com/kamailio/kamailio/commit/4910ddf9eebb8fa5106300b9e684ecb6...
---
diff --git a/modules/tm/t_msgbuilder.c b/modules/tm/t_msgbuilder.c index ded1b47..09bb6dc 100644 --- a/modules/tm/t_msgbuilder.c +++ b/modules/tm/t_msgbuilder.c @@ -1456,29 +1456,6 @@ static inline char* print_callid(char* w, dlg_t* dialog, struct cell* t) return w; }
-/* -* Find the first occurrence of find in s, where the search is limited to the -* first slen characters of s. -*/ -static -char * _strnstr(const char* s, const char* find, size_t slen) { - char c, sc; - size_t len; - - if ((c = *find++) != '\0') { - len = strlen(find); - do { - do { - if (slen-- < 1 || (sc = *s++) == '\0') - return (NULL); - } while (sc != c); - if (len > slen) - return (NULL); - } while (strncmp(s, find, len) != 0); - s--; - } - return ((char *)s); -}
/* * Create a request