1 --- a/pjsip/src/pjsua-lib/pjsua_acc.c
2 +++ b/pjsip/src/pjsua-lib/pjsua_acc.c
6 (int)t->local_name.host.slen,
7 - t->local_name.host.ptr,
8 + t->local_name.host.slen ? t->local_name.host.ptr : "",
12 @@ -1158,18 +1158,18 @@
13 len = pj_ansi_snprintf(tmp, PJSIP_MAX_URL_SIZE,
14 "<sip:%.*s%s%s%.*s%s:%d;transport=%s%.*s>%.*s",
15 (int)acc->user_part.slen,
17 + acc->user_part.slen ? acc->user_part.ptr : "",
18 (acc->user_part.slen? "@" : ""),
22 + via_addr->slen ? via_addr->ptr : "",
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 (int)acc->cfg.contact_params.slen,
30 - acc->cfg.contact_params.ptr);
31 + acc->cfg.contact_params.slen ? acc->cfg.contact_params.ptr : "");
33 PJ_LOG(1,(THIS_FILE, "URI too long"));
34 pj_pool_release(pool);
35 @@ -2233,22 +2233,22 @@
36 contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE,
37 "%.*s%s<%s:%.*s%s%s%.*s%s:%d%s%.*s>%.*s",
38 (int)acc->display.slen,
40 + acc->display.slen ? acc->display.ptr : "",
41 (acc->display.slen?" " : ""),
42 (secure ? PJSUA_SECURE_SCHEME : "sip"),
43 (int)acc->user_part.slen,
45 + acc->user_part.slen ? acc->user_part.ptr : "",
46 (acc->user_part.slen?"@":""),
50 + local_addr.slen ? local_addr.ptr : "",
54 (int)acc->cfg.contact_uri_params.slen,
55 - acc->cfg.contact_uri_params.ptr,
56 + acc->cfg.contact_uri_params.slen ? acc->cfg.contact_uri_params.ptr : "",
57 (int)acc->cfg.contact_params.slen,
58 - acc->cfg.contact_params.ptr);
59 + acc->cfg.contact_params.slen ? acc->cfg.contact_params.ptr : "");
63 @@ -2390,22 +2390,22 @@
64 contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE,
65 "%.*s%s<%s:%.*s%s%s%.*s%s:%d%s%.*s>%.*s",
66 (int)acc->display.slen,
68 + acc->display.slen ? acc->display.ptr : "",
69 (acc->display.slen?" " : ""),
70 (secure ? PJSUA_SECURE_SCHEME : "sip"),
71 (int)acc->user_part.slen,
73 + acc->user_part.slen ? acc->user_part.ptr : "",
74 (acc->user_part.slen?"@":""),
78 + local_addr.slen ? local_addr.ptr : "",
82 (int)acc->cfg.contact_uri_params.slen,
83 - acc->cfg.contact_uri_params.ptr,
84 + acc->cfg.contact_uri_params.slen ? acc->cfg.contact_uri_params.ptr : "",
85 (int)acc->cfg.contact_params.slen,
86 - acc->cfg.contact_params.ptr);
87 + acc->cfg.contact_params.slen ? acc->cfg.contact_params.ptr : "");