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
December 2017
----- 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
26 participants
475 discussions
Start a n
N
ew thread
git:master:f06e4d4b: misc_radius: use spve fixup helper instead of pvar
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: f06e4d4b81e0df1009c3f2bbc54f0be1bb4a5d32 URL:
https://github.com/kamailio/kamailio/commit/f06e4d4b81e0df1009c3f2bbc54f0be…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-05T09:17:49+01:00 misc_radius: use spve fixup helper instead of pvar - simplifies getting params --- Modified: src/modules/misc_radius/functions.c Modified: src/modules/misc_radius/misc_radius.c --- Diff:
https://github.com/kamailio/kamailio/commit/f06e4d4b81e0df1009c3f2bbc54f0be…
Patch:
https://github.com/kamailio/kamailio/commit/f06e4d4b81e0df1009c3f2bbc54f0be…
7 years
1
0
0
0
git:master:f283fe29: misc_radius: clang format the code
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: f283fe291917f67320061af3e35259859e448408 URL:
https://github.com/kamailio/kamailio/commit/f283fe291917f67320061af3e352598…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-05T08:21:58+01:00 misc_radius: clang format the code --- Modified: src/modules/misc_radius/extra.c Modified: src/modules/misc_radius/extra.h Modified: src/modules/misc_radius/functions.c Modified: src/modules/misc_radius/functions.h Modified: src/modules/misc_radius/misc_radius.c Modified: src/modules/misc_radius/misc_radius.h Modified: src/modules/misc_radius/radius.h --- Diff:
https://github.com/kamailio/kamailio/commit/f283fe291917f67320061af3e352598…
Patch:
https://github.com/kamailio/kamailio/commit/f283fe291917f67320061af3e352598…
7 years
1
0
0
0
git:master:cf043326: auth_radius: exported functions to kemi framework
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: cf043326abc792317335954fe75927f8294fa40e URL:
https://github.com/kamailio/kamailio/commit/cf043326abc792317335954fe75927f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T16:54:52+01:00 auth_radius: exported functions to kemi framework --- Modified: src/modules/auth_radius/auth_radius.c Modified: src/modules/auth_radius/authorize.c Modified: src/modules/auth_radius/authorize.h --- Diff:
https://github.com/kamailio/kamailio/commit/cf043326abc792317335954fe75927f…
Patch:
https://github.com/kamailio/kamailio/commit/cf043326abc792317335954fe75927f…
7 years
1
0
0
0
git:master:fe0c386c: auth_radius: use core fixup helper functions
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: fe0c386cebebbf6c68b598269ecdfc25bfe1bcc2 URL:
https://github.com/kamailio/kamailio/commit/fe0c386cebebbf6c68b598269ecdfc2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T16:03:52+01:00 auth_radius: use core fixup helper functions --- Modified: src/modules/auth_radius/auth_radius.c Modified: src/modules/auth_radius/authorize.c --- Diff:
https://github.com/kamailio/kamailio/commit/fe0c386cebebbf6c68b598269ecdfc2…
Patch:
https://github.com/kamailio/kamailio/commit/fe0c386cebebbf6c68b598269ecdfc2…
7 years
1
0
0
0
git:master:7453fc5f: acc_radius: clang format the code
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 7453fc5f8da8fed0941d5d8c759cec97e0647bfd URL:
https://github.com/kamailio/kamailio/commit/7453fc5f8da8fed0941d5d8c759cec9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T15:50:06+01:00 acc_radius: clang format the code --- Modified: src/modules/acc_radius/acc_radius_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/7453fc5f8da8fed0941d5d8c759cec9…
Patch:
https://github.com/kamailio/kamailio/commit/7453fc5f8da8fed0941d5d8c759cec9…
7 years
1
0
0
0
git:master:1c07ddb5: auth_radius: clang format the code
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 1c07ddb50cf56ea9566effb8ff7ada3de8f1d48b URL:
https://github.com/kamailio/kamailio/commit/1c07ddb50cf56ea9566effb8ff7ada3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T15:47:40+01:00 auth_radius: clang format the code --- Modified: src/modules/auth_radius/auth_radius.c Modified: src/modules/auth_radius/authorize.c Modified: src/modules/auth_radius/authorize.h Modified: src/modules/auth_radius/extra.c Modified: src/modules/auth_radius/extra.h Modified: src/modules/auth_radius/sterman.c Modified: src/modules/auth_radius/sterman.h --- Diff:
https://github.com/kamailio/kamailio/commit/1c07ddb50cf56ea9566effb8ff7ada3…
Patch:
https://github.com/kamailio/kamailio/commit/1c07ddb50cf56ea9566effb8ff7ada3…
7 years
1
0
0
0
git:master:afbc1a70: acc_radius: functions exported to kemi framework
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: afbc1a7099eb59dcd8c11a202c9abb1bcf972751 URL:
https://github.com/kamailio/kamailio/commit/afbc1a7099eb59dcd8c11a202c9abb1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T13:09:03+01:00 acc_radius: functions exported to kemi framework --- Modified: src/modules/acc_radius/acc_radius_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/afbc1a7099eb59dcd8c11a202c9abb1…
Patch:
https://github.com/kamailio/kamailio/commit/afbc1a7099eb59dcd8c11a202c9abb1…
--- diff --git a/src/modules/acc_radius/acc_radius_mod.c b/src/modules/acc_radius/acc_radius_mod.c index 94e521f537..8e3c4482d4 100644 --- a/src/modules/acc_radius/acc_radius_mod.c +++ b/src/modules/acc_radius/acc_radius_mod.c @@ -41,6 +41,7 @@ #include "../../core/dprint.h" #include "../../core/mem/mem.h" #include "../../core/parser/parse_to.h" +#include "../../core/kemi.h" #include "../misc_radius/radius.h" #include "../../modules/acc/acc_api.h" #include "acc_radius_mod.h" @@ -444,3 +445,84 @@ static int w_acc_radius_request(struct sip_msg *rq, char *comment, char *foo) return accb.exec(rq, &_acc_radius_engine, (acc_param_t*)comment); } +static int acc_radius_parse_code(char *p, acc_param_t *param) +{ + if (p==NULL||param==NULL) + return -1; + + /* any code? */ + if (param->reason.len>=3 && isdigit((int)p[0]) + && isdigit((int)p[1]) && isdigit((int)p[2]) ) { + param->code = (p[0]-'0')*100 + (p[1]-'0')*10 + (p[2]-'0'); + param->code_s.s = p; + param->code_s.len = 3; + param->reason.s += 3; + for( ; isspace((int)param->reason.s[0]) ; param->reason.s++ ); + param->reason.len = strlen(param->reason.s); + } + return 0; +} + +/** + * + */ +static int acc_radius_param_parse(str *s, acc_param_t *accp) +{ + if(s==NULL || s->s==NULL || s->len<=0 || accp==NULL) { + LM_ERR("invalid parameters\n"); + return -1; + } + memset(accp, 0, sizeof(acc_param_t)); + accp->reason.s = s->s; + accp->reason.len = s->len; + if (strchr(s->s, PV_MARKER)!=NULL) { + /* there is a cfg variable - not through kemi */ + LM_ERR("cfg variable detected - not supported\n"); + return -1; + } else { + if(acc_radius_parse_code(s->s, accp)<0) { + LM_ERR("failed to parse: [%.*s] (expected [code text])\n", + s->len, s->s); + return -1; + } + } + return 0; +} + +/** + * + */ +static int ki_acc_radius_request(sip_msg_t *rq, str *comment) +{ + acc_param_t accp; + + if(acc_radius_param_parse(comment, &accp)<0) { + LM_ERR("failed to parse parameter\n"); + return -1; + } + return accb.exec(rq, &_acc_radius_engine, &accp); +} + +/** + * + */ +/* clang-format off */ +static sr_kemi_t sr_kemi_acc_radius_exports[] = { + { str_init("acc_radius"), str_init("request"), + SR_KEMIP_INT, ki_acc_radius_request, + { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + + { {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } } +}; +/* clang-format on */ + +/** + * + */ +int mod_register(char *path, int *dlflags, void *p1, void *p2) +{ + sr_kemi_modules_add(sr_kemi_acc_radius_exports); + return 0; +}
7 years
1
0
0
0
git:5.0:782b76b4: jansson: fix the include guard in header file
by Daniel-Constantin Mierla
Module: kamailio Branch: 5.0 Commit: 782b76b40672075756348297bea61d2d38f96022 URL:
https://github.com/kamailio/kamailio/commit/782b76b40672075756348297bea61d2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T12:55:47+01:00 jansson: fix the include guard in header file (cherry picked from commit d17a48c186b0b8066518db2106037fe925846d2e) (cherry picked from commit 90b1b0e1f00f72dcac7f7ef1c734ea43afd1cd83) --- Modified: src/modules/jansson/jansson_path.h --- Diff:
https://github.com/kamailio/kamailio/commit/782b76b40672075756348297bea61d2…
Patch:
https://github.com/kamailio/kamailio/commit/782b76b40672075756348297bea61d2…
--- diff --git a/src/modules/jansson/jansson_path.h b/src/modules/jansson/jansson_path.h index 9aefb49a00..b31050702d 100644 --- a/src/modules/jansson/jansson_path.h +++ b/src/modules/jansson/jansson_path.h @@ -2,12 +2,12 @@ * Copyright (c) 2012 Rogerz Zhang <rogerz.zhang(a)gmail.com> * * Jansson is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. + * it under the terms of the MIT license. */ -#ifndef _JANSSON_FUNCS_H_ -#define _JANSSON_FUNCS_H_ +#ifndef _JANSSON_PATH_H_ +#define _JANSSON_PATH_H_ #include <jansson.h> json_t *json_path_get(const json_t *json, const char *path);
7 years
1
0
0
0
git:5.1:90b1b0e1: jansson: fix the include guard in header file
by Daniel-Constantin Mierla
Module: kamailio Branch: 5.1 Commit: 90b1b0e1f00f72dcac7f7ef1c734ea43afd1cd83 URL:
https://github.com/kamailio/kamailio/commit/90b1b0e1f00f72dcac7f7ef1c734ea4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T12:54:54+01:00 jansson: fix the include guard in header file (cherry picked from commit d17a48c186b0b8066518db2106037fe925846d2e) --- Modified: src/modules/jansson/jansson_path.h --- Diff:
https://github.com/kamailio/kamailio/commit/90b1b0e1f00f72dcac7f7ef1c734ea4…
Patch:
https://github.com/kamailio/kamailio/commit/90b1b0e1f00f72dcac7f7ef1c734ea4…
--- diff --git a/src/modules/jansson/jansson_path.h b/src/modules/jansson/jansson_path.h index 9aefb49a00..b31050702d 100644 --- a/src/modules/jansson/jansson_path.h +++ b/src/modules/jansson/jansson_path.h @@ -2,12 +2,12 @@ * Copyright (c) 2012 Rogerz Zhang <rogerz.zhang(a)gmail.com> * * Jansson is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. + * it under the terms of the MIT license. */ -#ifndef _JANSSON_FUNCS_H_ -#define _JANSSON_FUNCS_H_ +#ifndef _JANSSON_PATH_H_ +#define _JANSSON_PATH_H_ #include <jansson.h> json_t *json_path_get(const json_t *json, const char *path);
7 years
1
0
0
0
git:master:d17a48c1: jansson: fix the include guard in header file
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: d17a48c186b0b8066518db2106037fe925846d2e URL:
https://github.com/kamailio/kamailio/commit/d17a48c186b0b8066518db2106037fe…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2017-12-04T12:49:41+01:00 jansson: fix the include guard in header file --- Modified: src/modules/jansson/jansson_path.h --- Diff:
https://github.com/kamailio/kamailio/commit/d17a48c186b0b8066518db2106037fe…
Patch:
https://github.com/kamailio/kamailio/commit/d17a48c186b0b8066518db2106037fe…
--- diff --git a/src/modules/jansson/jansson_path.h b/src/modules/jansson/jansson_path.h index 9aefb49a00..b31050702d 100644 --- a/src/modules/jansson/jansson_path.h +++ b/src/modules/jansson/jansson_path.h @@ -2,12 +2,12 @@ * Copyright (c) 2012 Rogerz Zhang <rogerz.zhang(a)gmail.com> * * Jansson is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. + * it under the terms of the MIT license. */ -#ifndef _JANSSON_FUNCS_H_ -#define _JANSSON_FUNCS_H_ +#ifndef _JANSSON_PATH_H_ +#define _JANSSON_PATH_H_ #include <jansson.h> json_t *json_path_get(const json_t *json, const char *path);
7 years
1
0
0
0
← Newer
1
...
42
43
44
45
46
47
48
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
44
45
46
47
48
Results per page:
10
25
50
100
200