[sr-dev] git:master:5419e8b3: mohqueue: fix build warning

Victor Seva linuxmaniac at torreviejawireless.org
Thu Sep 15 17:22:03 CEST 2016


Module: kamailio
Branch: master
Commit: 5419e8b3b101a3369b59b354748842a3efd12028
URL: https://github.com/kamailio/kamailio/commit/5419e8b3b101a3369b59b354748842a3efd12028

Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date: 2016-09-15T17:20:24+02:00

mohqueue: fix build warning

> CC (gcc) [M mohqueue.so]		mohq.o
> mohq.c: In function 'mod_init':
> mohq.c:452:25: warning: passing argument 1 of 'pv_cache_get' from incompatible pointer type
>  prtp_pv = pv_cache_get (&prtpstat);
>                         ^
> In file included from ../rr/../../sr_module.h:44:0,
>                 from ../rr/api.h:43,
>                 from mohq_common.h:28,
>                 from mohq.h:25,
>                 from mohq.c:25:
> ../rr/../../pvar.h:208:12: note: expected 'struct str *' but argument is of type 'struct str (*)[1]'
>  pv_spec_t* pv_cache_get(str *name);
>            ^
> CC (gcc) [M mohqueue.so]		mohq_locks.o

---

Modified: modules/mohqueue/mohq.c

---

Diff:  https://github.com/kamailio/kamailio/commit/5419e8b3b101a3369b59b354748842a3efd12028.diff
Patch: https://github.com/kamailio/kamailio/commit/5419e8b3b101a3369b59b354748842a3efd12028.patch

---

diff --git a/modules/mohqueue/mohq.c b/modules/mohqueue/mohq.c
index 55a85ea..17b2f2b 100644
--- a/modules/mohqueue/mohq.c
+++ b/modules/mohqueue/mohq.c
@@ -449,7 +449,7 @@ if(rtplen != prtpstat->len)
   LM_ERR ("Unable to find RTPSTAT pv!\n");
   goto initerr;
   }
-prtp_pv = pv_cache_get (&prtpstat);
+prtp_pv = pv_cache_get (&prtpstat[0]);
 if(!prtp_pv)
   {
   LM_ERR ("Unable to find pv spec for RTPSTAT!\n");




More information about the sr-dev mailing list