Module: kamailio
Branch: master
Commit: a2f74c4ea76d570f4c8493664ebb94f3a1276276
URL:
https://github.com/kamailio/kamailio/commit/a2f74c4ea76d570f4c8493664ebb94f…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-12-26T20:27:09+01:00
erlang: remove the SHM_MEM #define, after core change
---
Modified: src/modules/erlang/erlang_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a2f74c4ea76d570f4c8493664ebb94f…
Patch:
https://github.com/kamailio/kamailio/commit/a2f74c4ea76d570f4c8493664ebb94f…
---
diff --git a/src/modules/erlang/erlang_mod.c b/src/modules/erlang/erlang_mod.c
index 15c05ce729..e4060698f9 100644
--- a/src/modules/erlang/erlang_mod.c
+++ b/src/modules/erlang/erlang_mod.c
@@ -283,7 +283,6 @@ static int child_init(int rank)
if (rank == PROC_INIT) {
-#ifdef SHM_MEM
usocks[KSOCKET]=(int*)shm_malloc(sizeof(int)*no_cnodes);
if (!usocks[KSOCKET]) {
LM_ERR("Not enough memory\n");
@@ -295,19 +294,6 @@ static int child_init(int rank)
LM_ERR("Not enough memory\n");
return -1;
}
-#else
- usocks[KSOCKET]=(int*)pkg_malloc(sizeof(int)*no_cnodes);
- if (!usocks[KSOCKET]) {
- LM_ERR("Not enough memory\n");
- return -1;
- }
-
- usocks[CSOCKET]=(int*)pkg_malloc(sizeof(int)*no_cnodes);
- if (!usocks[CSOCKET]) {
- LM_ERR("Not enough memory\n");
- return -1;
- }
-#endif
for(i=0;i<no_cnodes;i++) {
if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair)) {
@@ -397,13 +383,8 @@ static int child_init(int rank)
*/
static void mod_destroy(void)
{
-#ifdef SHM_MEM
shm_free(usocks[0]);
shm_free(usocks[1]);
-#else
- pkg_free(usocks[0]);
- pkg_free(usocks[1]);
-#endif
free_tuple_fmt_buff();
free_atom_fmt_buff();
free_list_fmt_buff();