[sr-dev] git:master:4ad790f6: evapi: cast to void* when printing logs with pointer value

Daniel-Constantin Mierla miconda at gmail.com
Thu May 14 21:31:19 CEST 2020


Module: kamailio
Branch: master
Commit: 4ad790f697554332ea590793d3ec56e13437e82f
URL: https://github.com/kamailio/kamailio/commit/4ad790f697554332ea590793d3ec56e13437e82f

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-05-14T21:15:51+02:00

evapi: cast to void* when printing logs with pointer value

---

Modified: src/modules/evapi/evapi_dispatch.c

---

Diff:  https://github.com/kamailio/kamailio/commit/4ad790f697554332ea590793d3ec56e13437e82f.diff
Patch: https://github.com/kamailio/kamailio/commit/4ad790f697554332ea590793d3ec56e13437e82f.patch

---

diff --git a/src/modules/evapi/evapi_dispatch.c b/src/modules/evapi/evapi_dispatch.c
index 52e8f1d23e..e16d4c5ad2 100644
--- a/src/modules/evapi/evapi_dispatch.c
+++ b/src/modules/evapi/evapi_dispatch.c
@@ -606,7 +606,7 @@ void evapi_recv_notify(struct ev_loop *loop, struct ev_io *watcher, int revents)
 		return;
 	}
 
-	LM_DBG("received [%p] [%.*s] (%d)\n", emsg,
+	LM_DBG("received [%p] [%.*s] (%d)\n", (void*)emsg,
 			emsg->data.len, emsg->data.s, emsg->data.len);
 	evapi_dispatch_notify(emsg);
 	shm_free(emsg);
@@ -774,8 +774,8 @@ int _evapi_relay(str *evdata, str *ctag, int unicast)
 		emsg->unicast = unicast;
 	}
 
-	LM_DBG("sending [%p] [%.*s] (%d)\n", emsg, emsg->data.len, emsg->data.s,
-			emsg->data.len);
+	LM_DBG("sending [%p] [%.*s] (%d)\n", (void*)emsg, emsg->data.len,
+			emsg->data.s, emsg->data.len);
 	if(_evapi_notify_sockets[1]!=-1) {
 		len = write(_evapi_notify_sockets[1], &emsg, sizeof(evapi_msg_t*));
 		if(len<=0) {
@@ -785,7 +785,7 @@ int _evapi_relay(str *evdata, str *ctag, int unicast)
 		}
 	} else {
 		cfg_update();
-		LM_DBG("dispatching [%p] [%.*s] (%d)\n", emsg,
+		LM_DBG("dispatching [%p] [%.*s] (%d)\n", (void*)emsg,
 				emsg->data.len, emsg->data.s, emsg->data.len);
 		if(evapi_dispatch_notify(emsg) == 0) {
 			shm_free(emsg);
@@ -855,7 +855,7 @@ int evapi_relay(str *event, str *data)
 		LM_ERR("failed to pass the pointer to evapi dispatcher\n");
 		return -1;
 	}
-	LM_DBG("sent [%p] [%.*s] (%d)\n", sbuf, sbuf->len, sbuf->s, sbuf->len);
+	LM_DBG("sent [%p] [%.*s] (%d)\n", (void*)sbuf, sbuf->len, sbuf->s, sbuf->len);
 	return 0;
 }
 #endif




More information about the sr-dev mailing list