Module: kamailio
Branch: master
Commit: f4b803183e71e0356eedadaca3801bbae26cf6fb
URL:
https://github.com/kamailio/kamailio/commit/f4b803183e71e0356eedadaca3801bb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-02-26T08:05:27+01:00
cdp: proper check not to go over allocated size of apps ids
- GH #1851
---
Modified: src/modules/cdp/peerstatemachine.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f4b803183e71e0356eedadaca3801bb…
Patch:
https://github.com/kamailio/kamailio/commit/f4b803183e71e0356eedadaca3801bb…
---
diff --git a/src/modules/cdp/peerstatemachine.c b/src/modules/cdp/peerstatemachine.c
index 5100e508e8..5d26605c70 100644
--- a/src/modules/cdp/peerstatemachine.c
+++ b/src/modules/cdp/peerstatemachine.c
@@ -670,7 +670,7 @@ void add_peer_application(peer *p, int id, int vendor, app_type type)
p->applications[i].vendor == vendor &&
p->applications[i].type == type) return;
- if (p->applications_cnt > p->applications_max) {
+ if (p->applications_cnt >= p->applications_max) {
LM_ERR("Too many applications for this peer (max %i), not adding Application
%i:%i.\n", p->applications_max, id, vendor);
return;
}