[sr-dev] git:master:3da3aa0c: evapi: minor fix in tag length compare

Daniel-Constantin Mierla miconda at gmail.com
Thu Oct 25 09:55:06 CEST 2018


Module: kamailio
Branch: master
Commit: 3da3aa0c9ee3fcd5aadd3924ee883666d2a15ac6
URL: https://github.com/kamailio/kamailio/commit/3da3aa0c9ee3fcd5aadd3924ee883666d2a15ac6

Author: dnadares <dnadares at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-10-25T09:55:00+02:00

evapi: minor fix in tag length compare

It was assigning the length instead of comparing it.

---

Modified: src/modules/evapi/evapi_dispatch.c

---

Diff:  https://github.com/kamailio/kamailio/commit/3da3aa0c9ee3fcd5aadd3924ee883666d2a15ac6.diff
Patch: https://github.com/kamailio/kamailio/commit/3da3aa0c9ee3fcd5aadd3924ee883666d2a15ac6.patch

---

diff --git a/src/modules/evapi/evapi_dispatch.c b/src/modules/evapi/evapi_dispatch.c
index fee0cc8c27..5b7d534d09 100644
--- a/src/modules/evapi/evapi_dispatch.c
+++ b/src/modules/evapi/evapi_dispatch.c
@@ -289,7 +289,7 @@ int evapi_dispatch_notify(evapi_msg_t *emsg)
 	n = 0;
 	for(i=0; i<EVAPI_MAX_CLIENTS; i++) {
 		if(_evapi_clients[i].connected==1 && _evapi_clients[i].sock>=0) {
-			if(emsg->tag.s==NULL || (emsg->tag.len = _evapi_clients[i].stag.len
+			if(emsg->tag.s==NULL || (emsg->tag.len == _evapi_clients[i].stag.len
 						&& strncmp(_evapi_clients[i].stag.s,
 									emsg->tag.s, emsg->tag.len)==0)) {
 				wlen = write(_evapi_clients[i].sock, emsg->data.s,




More information about the sr-dev mailing list