Module: kamailio
Branch: master
Commit: 0e74c602c0822393bc6032574f834e2a9030cc7b
URL:
https://github.com/kamailio/kamailio/commit/0e74c602c0822393bc6032574f834e2…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-09-01T17:14:05+02:00
rtp_media_server: use portable kamailio rand() wrapper instead of direct library call
---
Modified: src/modules/rtp_media_server/rtp_media_server.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0e74c602c0822393bc6032574f834e2…
Patch:
https://github.com/kamailio/kamailio/commit/0e74c602c0822393bc6032574f834e2…
---
diff --git a/src/modules/rtp_media_server/rtp_media_server.c
b/src/modules/rtp_media_server/rtp_media_server.c
index 37ddb1b998..8f2b2592aa 100644
--- a/src/modules/rtp_media_server/rtp_media_server.c
+++ b/src/modules/rtp_media_server/rtp_media_server.c
@@ -20,6 +20,7 @@
#include "rtp_media_server.h"
#include "../../core/fmsg.h"
+#include "../../core/rand/kam_rand.h"
MODULE_VERSION
@@ -169,7 +170,7 @@ static int mod_init(void)
rms->udp_start_port = 50000;
LM_INFO("RTP media server module init\n");
rms->udp_end_port = 60000;
- rms->udp_last_port = 50000 + rand() % 10000;
+ rms->udp_last_port = 50000 + kam_rand() % 10000;
rms_media_init();
if(!init_rms_dialog_list()) {