Skip to content

Commit

Permalink
rtpengine: cookie is now $server_id_$mypid_$myseqn
Browse files Browse the repository at this point in the history
(cherry picked from commit 3e92a47)
  • Loading branch information
lbalaceanu authored and miconda committed Jun 27, 2016
1 parent f265cad commit dfc6643
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions modules/rtpengine/rtpengine.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit dfc6643

Please sign in to comment.