Commit Graph

757 Commits

Author SHA1 Message Date
ionutboangiu
dd82bb3c4b Add sanity check to prevent xml reader panic
HierarchyPath parser now returns nil when
the path is empty (instead of a string slice with one
EmptyString element).

If the prefix is set to true, when calling the AsString
method on a nil HierarchyPath, only the separator will
be returned. This avoids a nil expr error coming from
the xmlquery library.

Use the Query and QueryAll functions from the xmlquery
package to be able to handle the errors ourselves and
avoid panics.

Added an integration tes for the special case where the
xml_root_path field is left empty. Before the change it
used to trim the root element from the path slice when
attempting to retrieve a the relative path slice.
2023-10-16 13:31:14 +03:00
arberkatellari
e59b340e51 Add test for radius with vendor 2023-10-09 21:07:20 +02:00
arberkatellari
39df92c1b3 Add proper condition for *radReplyCode, and tmp it test 2023-10-04 20:57:39 +02:00
ionutboangiu
b7d172f78a Fix misspellings 2023-06-21 11:02:39 +02:00
ionutboangiu
62619ba3a5 Replace interface{} with any 2023-06-05 10:55:32 +02:00
ionutboangiu
cb7ea790de Update rpcclient library to latest version
Replace all instances of rpcclient.ClientConnector with birpc.ClientConnector.

Pass context, maxReconnectInterval, delayFunc and birpcClient to rpcclient
constructors.

Remove redundant time.Duration conversions (e.g. time.Duration(1*time.Second)
now becomes time.Second.

Add context where needed (context.Background() for tests, context.TODO()
for places where it should be passed from somewhere else).

Implement that functionality of the SessionSv1.Sleep call, in sessions/sessions
instead of apier/v1.

Make changes in utils/server.go (replacing the old rpc2 library with github.com/cgrates/birpc).

Change the way we register birpc methods for sessions in services, using a helper function
defined in engine/libengine.go.
2023-05-03 10:02:15 +02:00
adi
c9a9857152 Added relevant paratheses 2022-12-02 18:39:29 +02:00
ionutboangiu
1436bac61c Remove unnecessary paranthesis 2022-12-02 14:24:18 +02:00
ionutboangiu
a748ab629e Apply gofmt simplify code 2022-12-02 14:24:18 +02:00
ionutboangiu
82468c580d Replace deprecated ioutil library, remove redundant statements + small optimizations 2022-12-02 14:24:18 +02:00
ionutboangiu
bcd0a47268 Update radius library 2022-11-21 11:04:21 +01:00
ionutboangiu
758a94280a Apply project wide fmt 2022-11-16 10:13:44 +01:00
adi
a6445f641e Displays messages for agents when connect + fixes on call tests 2022-11-11 17:04:59 +01:00
ionutboangiu
22f9ec262e Update most of the libraries 2022-11-09 14:04:58 +01:00
andronache
428cd37b8e Replaced header in multiple places 2021-11-01 13:50:23 +02:00
Trial97
d55f05a2e2 Revert "Updated libraries"
This reverts commit 50b17cb41c.
2021-09-29 19:18:13 +02:00
nickolasdaniel
0dbfc76e45 Fixed crash due to library update 2021-09-29 19:18:13 +02:00
Trial97
db3bf9f40d Updated build tags 2021-08-30 17:55:51 +03:00
ionutboangiu
2551a55f1d Add tests for *sipcid case from ParseField function in agentreq.go 2021-07-13 13:45:14 +02:00
Trial97
142e12a7ed Updated *sipcid 2021-07-08 16:42:22 +02:00
Trial97
cd7119c1ef Added *sipcid field type 2021-07-01 16:18:49 +02:00
andronache
f46ba34a26 AsteriskAgent - using directly ms duration instead of seconds with multiply 2021-06-29 10:12:07 +02:00
Trial97
07ef7f2609 Replaced max_call_duration config with default_usage for each ToR 2021-02-19 14:22:48 +01:00
Trial97
a7accbd6b5 Added *routes_maxcost flag. Fixes #2563 2021-02-09 13:39:18 +01:00
TeoV
2116571e57 Add integration test diameter authorization with ForceDuration flag 2020-12-16 15:31:40 +01:00
TeoV
f6b8bdc97f Update config for diameter(sctp/dispatcher) with *fd flag 2020-11-05 17:09:01 +01:00
TeoV
3128c29c4b DiameterAgent return NOT_FOUND instead of "filter not passing" error and let other subsystem to handle this (e.g. FilterS) 2020-09-10 18:54:49 +03:00
Trial97
1582620ccd Added new dataconverter *string2hex 2020-07-20 16:49:49 +02:00
TeoV
3a2dbee292 Instead of continue break from for 2020-07-20 12:59:09 +02:00
Trial97
68be0bf887 Added continue in case of nil connection while disconnecting 2020-07-17 17:16:46 +02:00
Trial97
511ef3a7ef Updated agents maxUsage flag handle 2020-07-14 15:28:49 +02:00
Hristo Trendev
9ccec44b95 Fix panic with configurations with multiple event socket connections 2020-07-12 09:45:02 +02:00
TeoV
115a9a1b7c Correctly populate max usage from Agents SessionSv1.ProcessEvent + added test 2020-07-10 15:25:09 +03:00
TeoV
28af81a818 Remove print from code 2020-07-09 17:27:11 +03:00
Trial97
716d766586 Added benchmark for AgentRequest 2020-05-24 11:57:15 +02:00
TeoV
3635f5ba36 Add test for counting NotFound supplier and the first supplier selected 2020-05-21 15:24:03 +02:00
Trial97
ab4944dc1a Removed config.NavigableMap 2020-05-18 12:43:13 +02:00
Trial97
dafe0214e4 Renamed NewPathToItem to NewPathItems 2020-05-18 12:43:13 +02:00
TeoV
109d3c2ea5 AgentRequest FieldAsInterface return Data instead NMItem 2020-05-07 16:19:31 +02:00
Trial97
a1e99e37d5 Updated integration tests 2020-05-07 11:19:03 +02:00
Trial97
2c53180ac8 Fixed agents unit tests 2020-05-07 11:19:03 +02:00
Trial97
9ef1dd05cc Updated AgentRequest 2020-05-07 11:19:03 +02:00
Trial97
80cdfe78c9 Added OrderedNavigableMap implementation 2020-05-07 11:19:03 +02:00
TeoV
c362dddc3d Add test for *fd flag 2020-04-22 14:33:44 +02:00
TeoV
3aaf458a2b Add support for *fd flag in agent 2020-04-22 12:38:06 +02:00
Trial97
5b7b07df69 Added tests for diamagent errored reply 2020-04-14 15:04:17 +02:00
Trial97
972395e372 Correctly handle error when creating the diameter answer 2020-04-14 15:04:17 +02:00
Trial97
4d4b5e3dae Updated agents tests 2020-03-24 17:03:49 +01:00
adragusin
fdcf0afbaa Added message when starting diameter Agent 2020-03-13 17:13:04 +01:00
adragusin
07877daef0 Changed the strip strategy (e.g. "right" to "*right") 2020-03-12 17:23:45 +01:00