ar71xx: ag71xx: detect the built-in switch of the AR934X SoCs
[openwrt.git] / package / pjsip / patches / 100-pjsua_acc__snprintf.patch
1 --- a/pjsip/src/pjsua-lib/pjsua_acc.c
2 +++ b/pjsip/src/pjsua-lib/pjsua_acc.c
3 @@ -511,7 +511,7 @@ PJ_DEF(pj_status_t) pjsua_acc_add_local(
4 "<sip:%s%.*s%s:%d%s>",
5 beginquote,
6 (int)t->local_name.host.slen,
7 - t->local_name.host.ptr,
8 + t->local_name.host.slen ? t->local_name.host.ptr : "",
9 endquote,
10 t->local_name.port,
11 transport_param);
12 @@ -1327,19 +1327,19 @@ static pj_bool_t acc_check_nat_addr(pjsu
13 len = pj_ansi_snprintf(tmp, PJSIP_MAX_URL_SIZE,
14 "<sip:%.*s%s%s%.*s%s:%d;transport=%s%.*s%s>%.*s",
15 (int)acc->user_part.slen,
16 - acc->user_part.ptr,
17 + acc->user_part.slen ? acc->user_part.ptr : "",
18 (acc->user_part.slen? "@" : ""),
19 beginquote,
20 (int)via_addr->slen,
21 - via_addr->ptr,
22 + via_addr->slen ? via_addr->ptr : "",
23 endquote,
24 rport,
25 tp->type_name,
26 (int)acc->cfg.contact_uri_params.slen,
27 - acc->cfg.contact_uri_params.ptr,
28 + acc->cfg.contact_uri_params.slen ? acc->cfg.contact_uri_params.ptr : "",
29 ob,
30 (int)acc->cfg.contact_params.slen,
31 - acc->cfg.contact_params.ptr);
32 + acc->cfg.contact_params.slen ? acc->cfg.contact_params.ptr : "");
33 if (len < 1) {
34 PJ_LOG(1,(THIS_FILE, "URI too long"));
35 pj_pool_release(pool);
36 @@ -2467,23 +2467,23 @@ PJ_DEF(pj_status_t) pjsua_acc_create_uac
37 contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE,
38 "%.*s%s<%s:%.*s%s%s%.*s%s:%d%s%.*s%s>%.*s",
39 (int)acc->display.slen,
40 - acc->display.ptr,
41 + acc->display.slen ? acc->display.ptr : "",
42 (acc->display.slen?" " : ""),
43 (secure ? PJSUA_SECURE_SCHEME : "sip"),
44 (int)acc->user_part.slen,
45 - acc->user_part.ptr,
46 + acc->user_part.slen ? acc->user_part.ptr : "",
47 (acc->user_part.slen?"@":""),
48 beginquote,
49 (int)local_addr.slen,
50 - local_addr.ptr,
51 + local_addr.slen ? local_addr.ptr : "",
52 endquote,
53 local_port,
54 transport_param,
55 (int)acc->cfg.contact_uri_params.slen,
56 - acc->cfg.contact_uri_params.ptr,
57 + acc->cfg.contact_uri_params.slen ? acc->cfg.contact_uri_params.ptr : "",
58 ob,
59 (int)acc->cfg.contact_params.slen,
60 - acc->cfg.contact_params.ptr);
61 + acc->cfg.contact_params.slen ? acc->cfg.contact_params.ptr : "");
62
63 return PJ_SUCCESS;
64 }
65 @@ -2625,22 +2625,22 @@ PJ_DEF(pj_status_t) pjsua_acc_create_uas
66 contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE,
67 "%.*s%s<%s:%.*s%s%s%.*s%s:%d%s%.*s>%.*s",
68 (int)acc->display.slen,
69 - acc->display.ptr,
70 + acc->display.slen ? acc->display.ptr : "",
71 (acc->display.slen?" " : ""),
72 (secure ? PJSUA_SECURE_SCHEME : "sip"),
73 (int)acc->user_part.slen,
74 - acc->user_part.ptr,
75 + acc->user_part.slen ? acc->user_part.ptr : "",
76 (acc->user_part.slen?"@":""),
77 beginquote,
78 (int)local_addr.slen,
79 - local_addr.ptr,
80 + local_addr.slen ? local_addr.ptr : "",
81 endquote,
82 local_port,
83 transport_param,
84 (int)acc->cfg.contact_uri_params.slen,
85 - acc->cfg.contact_uri_params.ptr,
86 + acc->cfg.contact_uri_params.slen ? acc->cfg.contact_uri_params.ptr : "",
87 (int)acc->cfg.contact_params.slen,
88 - acc->cfg.contact_params.ptr);
89 + acc->cfg.contact_params.slen ? acc->cfg.contact_params.ptr : "");
90
91 return PJ_SUCCESS;
92 }
This page took 0.050425 seconds and 5 git commands to generate.