Changeset 4944 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
- Timestamp:
- Oct 10, 2014 10:33:23 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r4942 r4944 2093 2093 pj_log_push_indent(); 2094 2094 2095 if ((acc->cfg.contact_rewrite_method & 2095 /* Check if we should do NAT bound address check for contact rewrite. 2096 * Note that '!contact_rewritten' check here is to avoid overriding 2097 * the current contact generated from last 2xx. 2098 */ 2099 if (!acc->contact_rewritten && 2100 (acc->cfg.contact_rewrite_method & 2096 2101 PJSUA_CONTACT_REWRITE_ALWAYS_UPDATE) == 2097 2102 PJSUA_CONTACT_REWRITE_ALWAYS_UPDATE && … … 2104 2109 param->contact_cnt = 1; 2105 2110 param->contact[0] = acc->reg_contact; 2111 2112 /* Don't set 'contact_rewritten' to PJ_TRUE here to allow 2113 * further check of NAT bound address in 2xx response. 2114 */ 2106 2115 } 2107 2116 } … … 2178 2187 update_rfc5626_status(acc, param->rdata); 2179 2188 2180 /* Check NAT bound address */ 2181 if (acc_check_nat_addr(acc, (acc->cfg.contact_rewrite_method & 3), 2189 /* Check NAT bound address if it hasn't been done before */ 2190 if (!acc->contact_rewritten && 2191 acc_check_nat_addr(acc, (acc->cfg.contact_rewrite_method & 3), 2182 2192 param)) 2183 2193 { 2184 2194 PJSUA_UNLOCK(); 2185 2195 pj_log_pop_indent(); 2196 2197 /* Avoid another check of NAT bound address */ 2198 acc->contact_rewritten = PJ_TRUE; 2186 2199 return; 2187 2200 } … … 2216 2229 acc->reg_last_err = param->status; 2217 2230 acc->reg_last_code = param->code; 2231 2232 /* Reaching this point means no contact rewrite, so reset the flag */ 2233 acc->contact_rewritten = PJ_FALSE; 2218 2234 2219 2235 /* Check if we need to auto retry registration. Basically, registration
Note: See TracChangeset
for help on using the changeset viewer.