rem: init_nr=random() % (1<<(RAND_DIGITS*4)); c=call_id; len=RAND_DIGITS; int2reverse_hex( &c, &len, init_nr ); while (len) { *c='z'; len--; c++; } *c='-';
add: if (RAND_MAX<TABLE_ENTRIES) { LOG(L_WARN, "Warning: uac does not spread " "accross the whole hash table\n"); }     for (rand_len_bits=0,uli=ULONG_MAX;uli; uli>>=1, rand_len_bits++ ); rand_len=rand_len_bits/4; if (rand_len>CALLID_NR_LEN) { LOG(L_ERR, "ERROR: Too small callid buffer\n"); return -1; }   for (rand_bits=0,i=RAND_MAX;i;i>>=1,rand_bits++);  rand_cnt=rand_len_bits / rand_bits;   callid_nr=rand();  while(rand_cnt) { rand_cnt--; callid_nr<<=rand_bits; callid_nr|=rand(); } callid_suffix=callid+rand_len; DBG("CALLID initialization: %lx (len=%d)\n", callid_nr, rand_len ); DBG("CALLID0=%0*lx\n", rand_len, callid_nr );
context: void uac_init() {	unsigned long init_nr;	char *c;	int len;	str src[3];	init_nr=random() % (1<<(RAND_DIGITS*4));	c=call_id;	len=RAND_DIGITS;	int2reverse_hex( &c, &len, init_nr );	while (len) { *c='z'; len--; c++; }	*c='-';	src[0].s="Long live SER server";	src[0].len=strlen(src[0].s);	src[1].s=sock_info[0].address_str.s;	src[1].len=strlen(src[1].s);	src[2].s=sock_info[0].port_no_str.s;	src[2].len=strlen(src[2].s);	MDStringArray( from_tag, src, 3 );	from_tag[MD5_LEN]=0;}