Commit 49b5e76b authored by Simon Morlat's avatar Simon Morlat
Browse files

update ms2, ortp to use new ortp_random()

parent 251ba960
...@@ -561,7 +561,7 @@ int sal_add_listen_port(Sal *ctx, SalAddress* addr){ ...@@ -561,7 +561,7 @@ int sal_add_listen_port(Sal *ctx, SalAddress* addr){
sal_address_get_port(addr), sal_address_get_port(addr),
sal_transport_to_string(sal_address_get_transport(addr))); sal_transport_to_string(sal_address_get_transport(addr)));
if (sal_address_get_port(addr)==-1 && lp==NULL){ if (sal_address_get_port(addr)==-1 && lp==NULL){
int random_port=(0xDFFF&random())+1024; int random_port=(0xDFFF&ortp_random())+1024;
ms_warning("This version of belle-sip doesn't support random port, choosing one here."); ms_warning("This version of belle-sip doesn't support random port, choosing one here.");
lp = belle_sip_stack_create_listening_point(ctx->stack, lp = belle_sip_stack_create_listening_point(ctx->stack,
sal_address_get_domain(addr), sal_address_get_domain(addr),
......
...@@ -89,9 +89,9 @@ static char presence_id_valid_start_characters[] = ":_abcdefghijklmnopqrstuvwxyz ...@@ -89,9 +89,9 @@ static char presence_id_valid_start_characters[] = ":_abcdefghijklmnopqrstuvwxyz
static char * generate_presence_id(void) { static char * generate_presence_id(void) {
char id[7]; char id[7];
int i; int i;
id[0] = presence_id_valid_start_characters[random() % (sizeof(presence_id_valid_start_characters)-1)]; id[0] = presence_id_valid_start_characters[ortp_random() % (sizeof(presence_id_valid_start_characters)-1)];
for (i = 1; i < 6; i++) { for (i = 1; i < 6; i++) {
id[i] = presence_id_valid_characters[random() % (sizeof(presence_id_valid_characters)-1)]; id[i] = presence_id_valid_characters[ortp_random() % (sizeof(presence_id_valid_characters)-1)];
} }
id[6] = '\0'; id[6] = '\0';
......
mediastreamer2 @ ab0e9b39
Subproject commit 2fcc5c672b5b3063ec6431baf3d0f448640540c3 Subproject commit ab0e9b39c5dc82fb04146fcc20843cc7fa361b6e
oRTP @ 41175821
Subproject commit fb2d9a0ee16362152fcbb0db568d295c3999c4a7 Subproject commit 411758216f9193e2888590f92448ffdada450882
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment