kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
April 2016
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
23 participants
430 discussions
Start a n
N
ew thread
git:master:19c18433: imc Minor updates to documentation
by Olle E. Johansson
Module: kamailio Branch: master Commit: 19c1843353190c4d5512164f0c083a28bcc47fc9 URL:
https://github.com/kamailio/kamailio/commit/19c1843353190c4d5512164f0c083a2…
Author: Olle E. Johansson <oej(a)edvina.net> Committer: Olle E. Johansson <oej(a)edvina.net> Date: 2016-04-13T20:47:02+02:00 imc Minor updates to documentation --- Modified: modules/imc/README Modified: modules/imc/doc/imc_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/19c1843353190c4d5512164f0c083a2…
Patch:
https://github.com/kamailio/kamailio/commit/19c1843353190c4d5512164f0c083a2…
8 years, 8 months
1
0
0
0
git:master:e5813d98: app_lua: implemented execution of kemi api functions with 3 params
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: e5813d980ed3eaab82435322002dac64bc19b78b URL:
https://github.com/kamailio/kamailio/commit/e5813d980ed3eaab82435322002dac6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-04-13T16:36:45+02:00 app_lua: implemented execution of kemi api functions with 3 params --- Modified: modules/app_lua/app_lua_sr.c --- Diff:
https://github.com/kamailio/kamailio/commit/e5813d980ed3eaab82435322002dac6…
Patch:
https://github.com/kamailio/kamailio/commit/e5813d980ed3eaab82435322002dac6…
--- diff --git a/modules/app_lua/app_lua_sr.c b/modules/app_lua/app_lua_sr.c index 6cb9ff0..b7bb39c 100644 --- a/modules/app_lua/app_lua_sr.c +++ b/modules/app_lua/app_lua_sr.c @@ -1542,9 +1542,79 @@ int sr_kemi_exec_func(lua_State* L, str *mname, int midx, str *fname) } break; case 3: - LM_ERR("invalid parameters for: %.*s\n", - fname->len, fname->s); - return app_lua_return_false(L); + if(ket->ptypes[0]==SR_KEMIP_INT) { + if(ket->ptypes[1]==SR_KEMIP_INT) { + if(ket->ptypes[2]==SR_KEMIP_INT) { + ret = ((sr_kemi_fmnnn_f)(ket->func))(env_L->msg, + vps[0].n, vps[1].n, vps[2].n); + return sr_kemi_return(L, ket, ret); + } else if(ket->ptypes[2]==SR_KEMIP_STR) { + ret = ((sr_kemi_fmnns_f)(ket->func))(env_L->msg, + vps[0].n, vps[1].n, &vps[2].s); + return sr_kemi_return(L, ket, ret); + } else { + LM_ERR("invalid parameters for: %.*s\n", + fname->len, fname->s); + return app_lua_return_false(L); + } + } else if(ket->ptypes[1]==SR_KEMIP_STR) { + if(ket->ptypes[2]==SR_KEMIP_INT) { + ret = ((sr_kemi_fmnsn_f)(ket->func))(env_L->msg, + vps[0].n, &vps[1].s, vps[2].n); + return sr_kemi_return(L, ket, ret); + } else if(ket->ptypes[2]==SR_KEMIP_STR) { + ret = ((sr_kemi_fmnss_f)(ket->func))(env_L->msg, + vps[0].n, &vps[1].s, &vps[2].s); + return sr_kemi_return(L, ket, ret); + } else { + LM_ERR("invalid parameters for: %.*s\n", + fname->len, fname->s); + return app_lua_return_false(L); + } + } else { + LM_ERR("invalid parameters for: %.*s\n", + fname->len, fname->s); + return app_lua_return_false(L); + } + } else if(ket->ptypes[0]==SR_KEMIP_STR) { + if(ket->ptypes[1]==SR_KEMIP_INT) { + if(ket->ptypes[2]==SR_KEMIP_INT) { + ret = ((sr_kemi_fmsnn_f)(ket->func))(env_L->msg, + &vps[0].s, vps[1].n, vps[2].n); + return sr_kemi_return(L, ket, ret); + } else if(ket->ptypes[2]==SR_KEMIP_STR) { + ret = ((sr_kemi_fmsns_f)(ket->func))(env_L->msg, + &vps[0].s, vps[1].n, &vps[2].s); + return sr_kemi_return(L, ket, ret); + } else { + LM_ERR("invalid parameters for: %.*s\n", + fname->len, fname->s); + return app_lua_return_false(L); + } + } else if(ket->ptypes[1]==SR_KEMIP_STR) { + if(ket->ptypes[2]==SR_KEMIP_INT) { + ret = ((sr_kemi_fmssn_f)(ket->func))(env_L->msg, + &vps[0].s, &vps[1].s, vps[2].n); + return sr_kemi_return(L, ket, ret); + } else if(ket->ptypes[2]==SR_KEMIP_STR) { + ret = ((sr_kemi_fmsss_f)(ket->func))(env_L->msg, + &vps[0].s, &vps[1].s, &vps[2].s); + return sr_kemi_return(L, ket, ret); + } else { + LM_ERR("invalid parameters for: %.*s\n", + fname->len, fname->s); + return app_lua_return_false(L); + } + } else { + LM_ERR("invalid parameters for: %.*s\n", + fname->len, fname->s); + return app_lua_return_false(L); + } + } else { + LM_ERR("invalid parameters for: %.*s\n", + fname->len, fname->s); + return app_lua_return_false(L); + } break; case 4: if(ket->ptypes[0]==SR_KEMIP_STR
8 years, 8 months
1
0
0
0
git:master:b0d8849b: core: kemi - added the index for callback names
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: b0d8849b74a850eea473832ac0069cf66d77587d URL:
https://github.com/kamailio/kamailio/commit/b0d8849b74a850eea473832ac0069cf…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-04-13T16:19:39+02:00 core: kemi - added the index for callback names - will keep the mapping between the embedded api callabcks and transaction events --- Modified: kemi.c Modified: kemi.h --- Diff:
https://github.com/kamailio/kamailio/commit/b0d8849b74a850eea473832ac0069cf…
Patch:
https://github.com/kamailio/kamailio/commit/b0d8849b74a850eea473832ac0069cf…
--- diff --git a/kemi.c b/kemi.c index 76a67e1..0fb8662 100644 --- a/kemi.c +++ b/kemi.c @@ -24,6 +24,8 @@ #include <stdlib.h> #include "dprint.h" +#include "locking.h" +#include "mem/shm.h" #include "kemi.h" @@ -92,7 +94,6 @@ static int lua_sr_kemi_info(sip_msg_t *msg, str *txt) return 0; } - /** * */ @@ -208,6 +209,10 @@ int sr_kemi_eng_set(str *ename, str *cpath) return 0; } + if(sr_kemi_cbname_list_init()<0) { + return -1; + } + for(i=0; i<_sr_kemi_eng_list_size; i++) { if(_sr_kemi_eng_list[i].ename.len==ename->len && strncasecmp(_sr_kemi_eng_list[i].ename.s, ename->s, @@ -240,8 +245,127 @@ int sr_kemi_eng_setz(char *ename, char *cpath) } } - +/** + * + */ sr_kemi_eng_t* sr_kemi_eng_get(void) { return _sr_kemi_eng; } + +/** + * + */ +#define KEMI_CBNAME_MAX_LEN 128 +#define KEMI_CBNAME_LIST_SIZE 256 + +typedef struct sr_kemi_cbname { + str name; + char bname[KEMI_CBNAME_MAX_LEN]; +} sr_kemi_cbname_t; + +static gen_lock_t *_sr_kemi_cbname_lock = 0; +static sr_kemi_cbname_t *_sr_kemi_cbname_list = NULL; +static int _sr_kemi_cbname_list_size = 0; + +/** + * + */ +int sr_kemi_cbname_list_init(void) +{ + if(_sr_kemi_cbname_list!=NULL) { + return 0; + } + if ( (_sr_kemi_cbname_lock=lock_alloc())==0) { + LM_CRIT("failed to alloc lock\n"); + return -1; + } + if (lock_init(_sr_kemi_cbname_lock)==0 ) { + LM_CRIT("failed to init lock\n"); + lock_dealloc(_sr_kemi_cbname_lock); + _sr_kemi_cbname_lock = NULL; + return -1; + } + _sr_kemi_cbname_list + = shm_malloc(KEMI_CBNAME_LIST_SIZE*sizeof(sr_kemi_cbname_t)); + if(_sr_kemi_cbname_list==NULL) { + LM_ERR("no more shared memory\n"); + lock_destroy(_sr_kemi_cbname_lock); + lock_dealloc(_sr_kemi_cbname_lock); + _sr_kemi_cbname_lock = NULL; + return -1; + } + memset(_sr_kemi_cbname_list, 0, + KEMI_CBNAME_LIST_SIZE*sizeof(sr_kemi_cbname_t)); + return 0; +} + +/** + * + */ +int sr_kemi_cbname_lookup_name(str *name) +{ + int n; + int i; + + if(_sr_kemi_cbname_list==NULL) { + return 0; + } + if(name->len >= KEMI_CBNAME_MAX_LEN) { + LM_ERR("callback name is too long [%.*s] (max: %d)\n", + name->len, name->s, KEMI_CBNAME_MAX_LEN); + return 0; + } + n = _sr_kemi_cbname_list_size; + + for(i=0; i<n; i++) { + if(_sr_kemi_cbname_list[i].name.len==name->len + && strncmp(_sr_kemi_cbname_list[i].name.s, + name->s, name->len)==0) { + return i+1; + } + } + + /* not found -- add it */ + lock_get(_sr_kemi_cbname_lock); + + /* check if new callback were indexed meanwhile */ + for(; i<_sr_kemi_cbname_list_size; i++) { + if(_sr_kemi_cbname_list[i].name.len==name->len + && strncmp(_sr_kemi_cbname_list[i].name.s, + name->s, name->len)==0) { + return i+1; + } + } + if(_sr_kemi_cbname_list_size>=KEMI_CBNAME_LIST_SIZE) { + lock_release(_sr_kemi_cbname_lock); + LM_ERR("no more space to index callbacks\n"); + return 0; + } + strncpy(_sr_kemi_cbname_list[i].bname, name->s, name->len); + _sr_kemi_cbname_list[i].bname[name->len] = '\0'; + _sr_kemi_cbname_list[i].name.s = _sr_kemi_cbname_list[i].bname; + _sr_kemi_cbname_list[i].name.len = name->len; + _sr_kemi_cbname_list_size++; + n = _sr_kemi_cbname_list_size; + lock_release(_sr_kemi_cbname_lock); + return n; +} + +/** + * + */ +str* sr_kemi_cbname_lookup_idx(int idx) +{ + int n; + + if(_sr_kemi_cbname_list==NULL) { + return NULL; + } + n = _sr_kemi_cbname_list_size; + if(idx<1 || idx>n) { + LM_ERR("index %d is out of range\n", idx); + return NULL; + } + return &_sr_kemi_cbname_list[idx-1].name; +} diff --git a/kemi.h b/kemi.h index ea33399..ede9456 100644 --- a/kemi.h +++ b/kemi.h @@ -103,4 +103,8 @@ int sr_kemi_eng_set(str *ename, str *cpath); int sr_kemi_eng_setz(char *ename, char *cpath); sr_kemi_eng_t* sr_kemi_eng_get(void); +int sr_kemi_cbname_list_init(void); +int sr_kemi_cbname_lookup_name(str *name); +str* sr_kemi_cbname_lookup_idx(int idx); + #endif
8 years, 8 months
1
0
0
0
git:master:fd077b0a: tm: shifted back indentation with one tab
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: fd077b0a03ded24765b0e26af4938bd2897245e4 URL:
https://github.com/kamailio/kamailio/commit/fd077b0a03ded24765b0e26af4938bd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-04-13T12:44:14+02:00 tm: shifted back indentation with one tab --- Modified: modules/tm/tm.c --- Diff:
https://github.com/kamailio/kamailio/commit/fd077b0a03ded24765b0e26af4938bd…
Patch:
https://github.com/kamailio/kamailio/commit/fd077b0a03ded24765b0e26af4938bd…
8 years, 8 months
1
0
0
0
git:master:0c589b59: core: kemi - commented relevant defines and structure members
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 0c589b5924587392ac5343d36a081a3a733bd74d URL:
https://github.com/kamailio/kamailio/commit/0c589b5924587392ac5343d36a081a3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2016-04-13T12:34:37+02:00 core: kemi - commented relevant defines and structure members --- Modified: kemi.h --- Diff:
https://github.com/kamailio/kamailio/commit/0c589b5924587392ac5343d36a081a3…
Patch:
https://github.com/kamailio/kamailio/commit/0c589b5924587392ac5343d36a081a3…
--- diff --git a/kemi.h b/kemi.h index 19e328b..ea33399 100644 --- a/kemi.h +++ b/kemi.h @@ -25,19 +25,19 @@ #include "str.h" #include "parser/msg_parser.h" -#define SR_KEMIP_NONE (0) -#define SR_KEMIP_INT (1<<0) -#define SR_KEMIP_STR (1<<1) -#define SR_KEMIP_BOOL (1<<2) +#define SR_KEMIP_NONE (0) /* no type */ +#define SR_KEMIP_INT (1<<0) /* type integer */ +#define SR_KEMIP_STR (1<<1) /* type str* */ +#define SR_KEMIP_BOOL (1<<2) /* type boolean (0/1) */ #define SR_KEMI_PARAMS_MAX 6 typedef struct sr_kemi { - str mname; - str fname; - int rtype; - void *func; - int ptypes[SR_KEMI_PARAMS_MAX]; + str mname; /* sub-module name */ + str fname; /* function name */ + int rtype; /* return type (supported SR_KEMIP_INT/BOOL) */ + void *func; /* pointer to the C function to be executed */ + int ptypes[SR_KEMI_PARAMS_MAX]; /* array with the type of parameters */ } sr_kemi_t; typedef struct sr_kemi_item {
8 years, 8 months
1
0
0
0
git:4.3:65d55ffc: erlang: fix compile warning unused but set variable
by Seudin Kasumovic
Module: kamailio Branch: 4.3 Commit: 65d55ffc8efcb1a50042a65a4465a17036c51a23 URL:
https://github.com/kamailio/kamailio/commit/65d55ffc8efcb1a50042a65a4465a17…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2016-04-13T08:50:30+02:00 erlang: fix compile warning unused but set variable - get rid of this variable (cherry picked from commit 32c3435c8122903958834002ba843b93c49495f0) --- Modified: modules/erlang/erl_helpers.c --- Diff:
https://github.com/kamailio/kamailio/commit/65d55ffc8efcb1a50042a65a4465a17…
Patch:
https://github.com/kamailio/kamailio/commit/65d55ffc8efcb1a50042a65a4465a17…
--- diff --git a/modules/erlang/erl_helpers.c b/modules/erlang/erl_helpers.c index f702a8b..1ec21d1 100644 --- a/modules/erlang/erl_helpers.c +++ b/modules/erlang/erl_helpers.c @@ -235,7 +235,6 @@ int erl_init_ec(ei_cnode *ec, const str *alivename, const str *hostname, const s char nodename[MAXNODELEN]; int result; - int port; /* copy the nodename into something we can modify */ if (snprintf(nodename, MAXNODELEN, "%.*s(a)%.*s", STR_FMT(alivename), STR_FMT(hostname)) >= MAXNODELEN) { @@ -256,8 +255,6 @@ int erl_init_ec(ei_cnode *ec, const str *alivename, const str *hostname, const s return -1; } - port = sockaddr_port(addr); - LM_DBG("initialized ec for cnode '%s' on %.*s[%s] creation %d.\n", nodename, STR_FMT(hostname), ip_addr2strz(&ip), creation); freeaddrinfo(ai);
8 years, 8 months
1
0
0
0
git:4.3:c118610a: erlang: fix register server process with the local name server epmd
by Seudin Kasumovic
Module: kamailio Branch: 4.3 Commit: c118610ae8bd5380c80564cca5e3022aa73541c8 URL:
https://github.com/kamailio/kamailio/commit/c118610ae8bd5380c80564cca5e3022…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2016-04-13T08:50:21+02:00 erlang: fix register server process with the local name server epmd - use correct alive name when number of C nodes greater then 1 - fix error check on register server process (cherry picked from commit 6f268b5a9d0bd07e689c401cb7221bb0f2c5f8be) --- Modified: modules/erlang/cnode.c Modified: modules/erlang/epmd.c Modified: modules/erlang/epmd.h Modified: modules/erlang/erl_helpers.c --- Diff:
https://github.com/kamailio/kamailio/commit/c118610ae8bd5380c80564cca5e3022…
Patch:
https://github.com/kamailio/kamailio/commit/c118610ae8bd5380c80564cca5e3022…
--- diff --git a/modules/erlang/cnode.c b/modules/erlang/cnode.c index f0f6e03..1e9b5d6 100644 --- a/modules/erlang/cnode.c +++ b/modules/erlang/cnode.c @@ -226,7 +226,7 @@ int init_cnode_sockets(int cnode_id) io_handler_ins(phandler); /* start epmd handler - publish Kamailo C node */ - if (epmd_init((epmd_handler_t*)phandler) < 0 ) { + if (epmd_init((epmd_handler_t*)phandler, &alivename) < 0 ) { return -1; } diff --git a/modules/erlang/epmd.c b/modules/erlang/epmd.c index 3a47e0f..43889aa 100644 --- a/modules/erlang/epmd.c +++ b/modules/erlang/epmd.c @@ -39,9 +39,9 @@ /** * \brief Initialize EPMD handler */ -int epmd_init(epmd_handler_t *epmd) +int epmd_init(epmd_handler_t *epmd, str *alivename) { - epmd->sockfd = erl_init_node(&epmd->ec, &cnode_alivename, &cnode_host, &cookie); + epmd->sockfd = erl_init_node(&epmd->ec, alivename, &cnode_host, &cookie); epmd->handle_f = handle_epmd; epmd->wait_tmo_f = NULL; epmd->destroy_f = NULL; diff --git a/modules/erlang/epmd.h b/modules/erlang/epmd.h index d5d4507..09b3eb5 100644 --- a/modules/erlang/epmd.h +++ b/modules/erlang/epmd.h @@ -55,7 +55,7 @@ typedef struct epmd_handler_s } epmd_handler_t; -int epmd_init(epmd_handler_t *epmd); +int epmd_init(epmd_handler_t *epmd, str *alivename); int handle_epmd(handler_common_t *phandler); #endif /* EPMD_H_ */ diff --git a/modules/erlang/erl_helpers.c b/modules/erlang/erl_helpers.c index cc43e92..f702a8b 100644 --- a/modules/erlang/erl_helpers.c +++ b/modules/erlang/erl_helpers.c @@ -307,9 +307,9 @@ int erl_init_node(ei_cnode *ec, const str *alivename, const str *hostname, const sockaddr2ip_addr(&ip, addr); /* publish */ - if ((epmdfd = ei_publish_tmo(ec, port, timeout_ms)) == -1) { + if ((epmdfd = ei_publish_tmo(ec, port, timeout_ms)) < 0) { - LM_ERR("Failed to publish port %u to epmd, check is epmd started\n", port); + LM_DBG("Failed publish %s:%u[%u] as %s: %s (%d)\n",ip_addr2strz(&ip),port,listen_fd,nodename, strerror(erl_errno), epmdfd); erl_close_socket(listen_fd); return -1;
8 years, 8 months
1
0
0
0
git:4.4:3e29e0bc: erlang: fix compile warning unused but set variable
by Seudin Kasumovic
Module: kamailio Branch: 4.4 Commit: 3e29e0bcfb14f0e95639eb99b777da84d46becf1 URL:
https://github.com/kamailio/kamailio/commit/3e29e0bcfb14f0e95639eb99b777da8…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2016-04-13T08:48:29+02:00 erlang: fix compile warning unused but set variable - get rid of this variable (cherry picked from commit 32c3435c8122903958834002ba843b93c49495f0) --- Modified: modules/erlang/erl_helpers.c --- Diff:
https://github.com/kamailio/kamailio/commit/3e29e0bcfb14f0e95639eb99b777da8…
Patch:
https://github.com/kamailio/kamailio/commit/3e29e0bcfb14f0e95639eb99b777da8…
--- diff --git a/modules/erlang/erl_helpers.c b/modules/erlang/erl_helpers.c index f702a8b..1ec21d1 100644 --- a/modules/erlang/erl_helpers.c +++ b/modules/erlang/erl_helpers.c @@ -235,7 +235,6 @@ int erl_init_ec(ei_cnode *ec, const str *alivename, const str *hostname, const s char nodename[MAXNODELEN]; int result; - int port; /* copy the nodename into something we can modify */ if (snprintf(nodename, MAXNODELEN, "%.*s(a)%.*s", STR_FMT(alivename), STR_FMT(hostname)) >= MAXNODELEN) { @@ -256,8 +255,6 @@ int erl_init_ec(ei_cnode *ec, const str *alivename, const str *hostname, const s return -1; } - port = sockaddr_port(addr); - LM_DBG("initialized ec for cnode '%s' on %.*s[%s] creation %d.\n", nodename, STR_FMT(hostname), ip_addr2strz(&ip), creation); freeaddrinfo(ai);
8 years, 8 months
1
0
0
0
git:master:32c3435c: erlang: fix compile warning unused but set variable
by Seudin Kasumovic
Module: kamailio Branch: master Commit: 32c3435c8122903958834002ba843b93c49495f0 URL:
https://github.com/kamailio/kamailio/commit/32c3435c8122903958834002ba843b9…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2016-04-13T08:44:25+02:00 erlang: fix compile warning unused but set variable - get rid of this variable --- Modified: modules/erlang/erl_helpers.c --- Diff:
https://github.com/kamailio/kamailio/commit/32c3435c8122903958834002ba843b9…
Patch:
https://github.com/kamailio/kamailio/commit/32c3435c8122903958834002ba843b9…
--- diff --git a/modules/erlang/erl_helpers.c b/modules/erlang/erl_helpers.c index f702a8b..1ec21d1 100644 --- a/modules/erlang/erl_helpers.c +++ b/modules/erlang/erl_helpers.c @@ -235,7 +235,6 @@ int erl_init_ec(ei_cnode *ec, const str *alivename, const str *hostname, const s char nodename[MAXNODELEN]; int result; - int port; /* copy the nodename into something we can modify */ if (snprintf(nodename, MAXNODELEN, "%.*s(a)%.*s", STR_FMT(alivename), STR_FMT(hostname)) >= MAXNODELEN) { @@ -256,8 +255,6 @@ int erl_init_ec(ei_cnode *ec, const str *alivename, const str *hostname, const s return -1; } - port = sockaddr_port(addr); - LM_DBG("initialized ec for cnode '%s' on %.*s[%s] creation %d.\n", nodename, STR_FMT(hostname), ip_addr2strz(&ip), creation); freeaddrinfo(ai);
8 years, 8 months
1
0
0
0
git:4.4:297d9732: erlang: fix register server process with the local name server epmd
by Seudin Kasumovic
Module: kamailio Branch: 4.4 Commit: 297d9732504290a1209ae7cf883127fadc1156aa URL:
https://github.com/kamailio/kamailio/commit/297d9732504290a1209ae7cf883127f…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com> Date: 2016-04-13T08:48:00+02:00 erlang: fix register server process with the local name server epmd - use correct alive name when number of C nodes greater then 1 - fix error check on register server process (cherry picked from commit 6f268b5a9d0bd07e689c401cb7221bb0f2c5f8be) --- Modified: modules/erlang/cnode.c Modified: modules/erlang/epmd.c Modified: modules/erlang/epmd.h Modified: modules/erlang/erl_helpers.c --- Diff:
https://github.com/kamailio/kamailio/commit/297d9732504290a1209ae7cf883127f…
Patch:
https://github.com/kamailio/kamailio/commit/297d9732504290a1209ae7cf883127f…
--- diff --git a/modules/erlang/cnode.c b/modules/erlang/cnode.c index f0f6e03..1e9b5d6 100644 --- a/modules/erlang/cnode.c +++ b/modules/erlang/cnode.c @@ -226,7 +226,7 @@ int init_cnode_sockets(int cnode_id) io_handler_ins(phandler); /* start epmd handler - publish Kamailo C node */ - if (epmd_init((epmd_handler_t*)phandler) < 0 ) { + if (epmd_init((epmd_handler_t*)phandler, &alivename) < 0 ) { return -1; } diff --git a/modules/erlang/epmd.c b/modules/erlang/epmd.c index 3a47e0f..43889aa 100644 --- a/modules/erlang/epmd.c +++ b/modules/erlang/epmd.c @@ -39,9 +39,9 @@ /** * \brief Initialize EPMD handler */ -int epmd_init(epmd_handler_t *epmd) +int epmd_init(epmd_handler_t *epmd, str *alivename) { - epmd->sockfd = erl_init_node(&epmd->ec, &cnode_alivename, &cnode_host, &cookie); + epmd->sockfd = erl_init_node(&epmd->ec, alivename, &cnode_host, &cookie); epmd->handle_f = handle_epmd; epmd->wait_tmo_f = NULL; epmd->destroy_f = NULL; diff --git a/modules/erlang/epmd.h b/modules/erlang/epmd.h index d5d4507..09b3eb5 100644 --- a/modules/erlang/epmd.h +++ b/modules/erlang/epmd.h @@ -55,7 +55,7 @@ typedef struct epmd_handler_s } epmd_handler_t; -int epmd_init(epmd_handler_t *epmd); +int epmd_init(epmd_handler_t *epmd, str *alivename); int handle_epmd(handler_common_t *phandler); #endif /* EPMD_H_ */ diff --git a/modules/erlang/erl_helpers.c b/modules/erlang/erl_helpers.c index cc43e92..f702a8b 100644 --- a/modules/erlang/erl_helpers.c +++ b/modules/erlang/erl_helpers.c @@ -307,9 +307,9 @@ int erl_init_node(ei_cnode *ec, const str *alivename, const str *hostname, const sockaddr2ip_addr(&ip, addr); /* publish */ - if ((epmdfd = ei_publish_tmo(ec, port, timeout_ms)) == -1) { + if ((epmdfd = ei_publish_tmo(ec, port, timeout_ms)) < 0) { - LM_ERR("Failed to publish port %u to epmd, check is epmd started\n", port); + LM_DBG("Failed publish %s:%u[%u] as %s: %s (%d)\n",ip_addr2strz(&ip),port,listen_fd,nodename, strerror(erl_errno), epmdfd); erl_close_socket(listen_fd); return -1;
8 years, 8 months
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
43
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Results per page:
10
25
50
100
200