| 209 | |
| 210 | |
| 211 | static 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 | |
| 243 | struct cell* build_cell( struct sip_msg* p_msg, int full_uas) |
no test coverage detected