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

« back to all changes in this revision

Viewing changes to modules/tm/t_msgbuilder.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:
815
815
                return F_RB_NH_STRICT;
816
816
        /* if 1st route contains an IP address, comparing it against .dst */
817
817
        if ((uri_ia = str2ip(&topr_uri.host))
818
 
#ifdef USE_IPV6
819
818
                        || (uri_ia = str2ip6(&topr_uri.host))
820
 
#endif
821
819
                        ) {
822
820
                /* we have an IP address in route -> comparison can go swiftly */
823
821
                if (init_su(&uri_sau, uri_ia, uri_port) < 0)
1398
1396
static inline char* print_to(char* w, dlg_t* dialog, struct cell* t)
1399
1397
{
1400
1398
        t->to.s = w;
1401
 
        t->to.len = TO_LEN + dialog->rem_uri.len + CRLF_LEN;
 
1399
        t->to.len = TO_LEN + dialog->rem_uri.len + CRLF_LEN
 
1400
                + ((dialog->rem_uri.s[0]!='<')?2:0);
1402
1401
 
1403
1402
        memapp(w, TO, TO_LEN);
 
1403
        if(dialog->rem_uri.s[0]!='<') memapp(w, "<", 1);
1404
1404
        memapp(w, dialog->rem_uri.s, dialog->rem_uri.len);
 
1405
        if(dialog->rem_uri.s[0]!='<') memapp(w, ">", 1);
1405
1406
 
1406
1407
        if (dialog->id.rem_tag.len) {
1407
1408
                t->to.len += TOTAG_LEN + dialog->id.rem_tag.len ;
1420
1421
static inline char* print_from(char* w, dlg_t* dialog, struct cell* t)
1421
1422
{
1422
1423
        t->from.s = w;
1423
 
        t->from.len = FROM_LEN + dialog->loc_uri.len + CRLF_LEN;
 
1424
        t->from.len = FROM_LEN + dialog->loc_uri.len + CRLF_LEN
 
1425
                + ((dialog->loc_uri.s[0]!='<')?2:0);
1424
1426
 
1425
1427
        memapp(w, FROM, FROM_LEN);
 
1428
        if(dialog->loc_uri.s[0]!='<') memapp(w, "<", 1);
1426
1429
        memapp(w, dialog->loc_uri.s, dialog->loc_uri.len);
 
1430
        if(dialog->loc_uri.s[0]!='<') memapp(w, ">", 1);
1427
1431
 
1428
1432
        if (dialog->id.loc_tag.len) {
1429
1433
                t->from.len += FROMTAG_LEN + dialog->id.loc_tag.len;
1544
1548
 
1545
1549
        *len += TO_LEN + dialog->rem_uri.len
1546
1550
                + (dialog->id.rem_tag.len ? (TOTAG_LEN + dialog->id.rem_tag.len) : 0) + CRLF_LEN;    /* To */
 
1551
        if(dialog->rem_uri.s[0]!='<') *len += 2; /* To-URI < > */
1547
1552
        *len += FROM_LEN + dialog->loc_uri.len
1548
1553
                + (dialog->id.loc_tag.len ? (FROMTAG_LEN + dialog->id.loc_tag.len) : 0) + CRLF_LEN;  /* From */
 
1554
        if(dialog->loc_uri.s[0]!='<') *len += 2; /* From-URI < > */
1549
1555
        *len += CALLID_LEN + dialog->id.call_id.len + CRLF_LEN;                                      /* Call-ID */
1550
1556
        *len += CSEQ_LEN + cseq.len + 1 + method->len + CRLF_LEN;                                    /* CSeq */
1551
1557
        *len += calculate_routeset_length(dialog);                                                   /* Route set */
1606
1612
int t_calc_branch(struct cell *t, 
1607
1613
        int b, char *branch, int *branch_len)
1608
1614
{
1609
 
        return syn_branch ?
1610
 
                branch_builder( t->hash_index,
1611
 
                        t->label, 0,
1612
 
                        b, branch, branch_len )
1613
 
                : branch_builder( t->hash_index,
 
1615
        return branch_builder( t->hash_index,
1614
1616
                        0, t->md5,
1615
1617
                        b, branch, branch_len );
1616
1618
}