Browse Source

rtpengine: cookie is now $server_id_$mypid_$myseqn

Lucian Balaceanu 9 years ago
parent
commit
3e92a47fb3
1 changed files with 2 additions and 6 deletions
  1. 2 6
      modules/rtpengine/rtpengine.c

+ 2 - 6
modules/rtpengine/rtpengine.c

@@ -2020,13 +2020,9 @@ static void mod_destroy(void)
 
 static char * gencookie(void)
 {
-	static char cook[COOKIE_SIZE];
-	char hostname[HOSTNAME_SIZE];
-
-	if (gethostname(hostname, HOSTNAME_SIZE - 1) < 0)
-		strcpy(hostname, "host");
-	snprintf(cook, COOKIE_SIZE, "%s_%d_%u ", hostname, (int)mypid, myseqn);
+	static char cook[34];
 
+	snprintf(cook, 34, "%d_%d_%u ", server_id, (int)mypid, myseqn);
 	myseqn++;
 	return cook;
 }