MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / init_synonym_id

Function init_synonym_id

modules/tm/h_table.c:211–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209
210
211static inline void init_synonym_id( struct cell *t )
212{
213 struct sip_msg *p_msg;
214 int size;
215 char *c;
216 unsigned int myrand;
217
218 if (!syn_branch) {
219 p_msg=t->uas.request;
220 if (p_msg) {
221 /* char value of a proxied transaction is
222 calculated out of header-fields forming
223 transaction key
224 */
225 char_msg_val( p_msg, t->md5 );
226 } else {
227 /* char value for a UAC transaction is created
228 randomly -- UAC is an originating stateful element
229 which cannot be refreshed, so the value can be
230 anything
231 */
232 /* HACK : not long enough */
233 myrand=rand();
234 c=t->md5;
235 size=MD5_LEN;
236 memset(c, '0', size );
237 int2reverse_hex( &c, &size, myrand );
238 }
239 }
240}
241
242
243struct cell* build_cell( struct sip_msg* p_msg, int full_uas)

Callers 1

build_cellFunction · 0.85

Calls 2

char_msg_valFunction · 0.85
int2reverse_hexFunction · 0.85

Tested by

no test coverage detected