~ubuntu-branches/debian/sid/kamailio/sid

« back to all changes in this revision

Viewing changes to modules/tm/h_table.c

  • Committer: Package Import Robot
  • Author(s): Victor Seva
  • Date: 2014-01-06 11:47:13 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140106114713-t8xidp4arzrnyeya
Tags: 4.1.1-1
* New upstream release
* debian/patches:
  - add upstream fixes
* Added tls outbound websocket autheph dnssec modules
  - openssl exception added to their license
* removing sparc and ia64 from supported archs
  for mono module (Closes: #728915)

Show diffs side-by-side

added added

removed removed

Lines of Context:
256
256
        char *c;
257
257
        unsigned int myrand;
258
258
 
259
 
        if (!syn_branch) {
260
 
                p_msg=t->uas.request;
261
 
                if (p_msg) {
262
 
                        /* char value of a proxied transaction is
263
 
                           calculated out of header-fields forming
264
 
                           transaction key
265
 
                        */
266
 
                        char_msg_val( p_msg, t->md5 );
267
 
                } else {
268
 
                        /* char value for a UAC transaction is created
269
 
                           randomly -- UAC is an originating stateful element 
270
 
                           which cannot be refreshed, so the value can be
271
 
                           anything
272
 
                        */
273
 
                        /* HACK : not long enough */
274
 
                        myrand=rand();
275
 
                        c=t->md5;
276
 
                        size=MD5_LEN;
277
 
                        memset(c, '0', size );
278
 
                        int2reverse_hex( &c, &size, myrand );
279
 
                }
 
259
        p_msg=t->uas.request;
 
260
        if (p_msg) {
 
261
                /* char value of a proxied transaction is
 
262
                   calculated out of header-fields forming
 
263
                   transaction key
 
264
                */
 
265
                char_msg_val( p_msg, t->md5 );
 
266
        } else {
 
267
                /* char value for a UAC transaction is created
 
268
                   randomly -- UAC is an originating stateful element
 
269
                   which cannot be refreshed, so the value can be
 
270
                   anything
 
271
                */
 
272
                /* HACK : not long enough */
 
273
                myrand=rand();
 
274
                c=t->md5;
 
275
                size=MD5_LEN;
 
276
                memset(c, '0', size );
 
277
                int2reverse_hex( &c, &size, myrand );
280
278
        }
281
279
}
282
280
 
309
307
        sr_xavp_t** xold;
310
308
#endif
311
309
 
312
 
        /* allocs a new cell */
313
 
        /* if syn_branch==0 add space for md5 (MD5_LEN -sizeof(struct cell.md5)) */
 
310
        /* allocs a new cell, add space for md5 (MD5_LEN - sizeof(struct cell.md5)) */
314
311
        new_cell = (struct cell*)shm_malloc( sizeof( struct cell )+
315
 
                        ((MD5_LEN-sizeof(((struct cell*)0)->md5))&((syn_branch!=0)-1)) );
 
312
                        MD5_LEN-sizeof(((struct cell*)0)->md5) );
316
313
        if  ( !new_cell ) {
317
314
                ser_error=E_OUT_OF_MEM;
318
315
                return NULL;
383
380
 
384
381
        init_synonym_id(new_cell);
385
382
        init_cell_lock(  new_cell );
 
383
        init_async_lock( new_cell );
386
384
        t_stats_created();
387
385
        return new_cell;
388
386