[sr-dev] git:master:e8b90500: kazoo: add kz prefix to str_split utility function

Henning Westerholt hw at kamailio.org
Fri Nov 2 19:27:50 CET 2018


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

Author: Henning Westerholt <hw at kamailio.org>
Committer: Henning Westerholt <hw at kamailio.org>
Date: 2018-11-02T19:27:27+01:00

kazoo: add kz prefix to str_split utility function

- add kz prefix to str_split utility function, to prevent overlapping with a
  function with similar name in the json module

---

Modified: src/modules/kazoo/kz_json.c

---

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

---

diff --git a/src/modules/kazoo/kz_json.c b/src/modules/kazoo/kz_json.c
index 4fd30998f6..5ab8f68c79 100644
--- a/src/modules/kazoo/kz_json.c
+++ b/src/modules/kazoo/kz_json.c
@@ -49,7 +49,7 @@ enum json_type kz_json_get_type(struct json_object *jso)
 typedef str* json_key;
 typedef json_key* json_keys;
 
-json_keys str_split(char* a_str, const char a_delim, int* c)
+json_keys kz_str_split(char* a_str, const char a_delim, int* c)
 {
 	json_keys result = 0;
     int count     = 0;
@@ -145,7 +145,7 @@ struct json_object * kz_json_get_field_object(str* json, str* field)
   dup = pkg_malloc(field->len+1);
   memcpy(dup, field->s, field->len);
   dup[field->len] = '\0';
-  keys = str_split(dup, '.', &parts);
+  keys = kz_str_split(dup, '.', &parts);
   pkg_free(dup);
 
     if (keys)




More information about the sr-dev mailing list