rem: if (ul.update_ucontact(c, e, q, &callid, cseq, (fl ? FL_NAT : FL_NONE), (fl ? FL_NONE : FL_NAT), _ua, recv, _m->rcv.bind_address) < 0) {
add: set = nated | mem_only; reset = ~(nated | mem_only) & (FL_NAT | FL_MEM); if (ul.update_ucontact(c, e, q, &callid, cseq, set, reset, _ua, recv, _m->rcv.bind_address) < 0) {
context: static inline int update(struct sip_msg* _m, urecord_t* _r, contact_t* _c, str* _ua){	ucontact_t* c, *c2;	str callid;	int cseq, e, ret;	qvalue_t q;	unsigned int fl;	str* recv;	int_str rcv_avp;	int_str val;		rcv_avp.n=rcv_avp_no;	fl = (isflagset(_m, nat_flag) == 1);	if (max_contacts) {		ret = test_max_contacts(_m, _r, _c);		if (ret != 0) {			build_contact(_r->contacts);			return -1;		}	}	_c = get_first_contact(_m);	while(_c) {		if (calc_contact_expires(_m, _c->expires, &e) < 0) {			build_contact(_r->contacts);			LOG(L_ERR, "update(): Error while calculating expires\n");			return -1;		}		if (ul.get_ucontact(_r, &_c->uri, &c) > 0) {			     /* Contact not found */			if (e != 0) {				     /* Calculate q value of the contact */				if (calc_contact_q(_c->q, &q) < 0) {					LOG(L_ERR, "update(): Error while calculating q\n");					return -2;				}								     /* Get callid of the message */				callid = _m->callid->body;				trim_trailing(&callid);								     /* Get CSeq number of the message */				if (str2int(&(((struct cseq_body*)_m->cseq->parsed)->number), 								(unsigned int*) &cseq) < 0) {					rerrno = R_INV_CSEQ;					LOG(L_ERR, "update(): Error while converting cseq number\n");					return -3;				}								if (_c->received) {					recv = &_c->received->body;				} else if (search_first_avp(0, rcv_avp, &val)) {					recv = val.s;				} else {					recv = 0;				}				if (ul.insert_ucontact(_r, &_c->uri, e, q, &callid, cseq,						       (fl ? FL_NAT : FL_NONE), &c2, _ua, recv, 						       _m->rcv.bind_address) < 0) {					rerrno = R_UL_INS_C;					LOG(L_ERR, "update(): Error while inserting contact\n");					return -4;				}				if (mem_only) {					c2->flags |= FL_MEM;				} else {					c2->flags &= ~FL_MEM;				}			}		} else {			if (e == 0) {				if (mem_only) {					c->flags |= FL_MEM;				} else {					c->flags &= ~FL_MEM;				}				if (ul.delete_ucontact(_r, c) < 0) {					rerrno = R_UL_DEL_C;					LOG(L_ERR, "update(): Error while deleting contact\n");					return -5;				}			} else {				     /* Calculate q value of the contact */				if (calc_contact_q(_c->q, &q) < 0) {					LOG(L_ERR, "update(): Error while calculating q\n");					return -6;				}								     /* Get callid of the message */				callid = _m->callid->body;								trim_trailing(&callid);								     /* Get CSeq number of the message */				if (str2int(&(((struct cseq_body*)_m->cseq->parsed)->number), (unsigned int*)&cseq)							< 0) {					rerrno = R_INV_CSEQ;					LOG(L_ERR, "update(): Error while converting cseq number\n");					return -7;				}								if (_c->received) {					recv = &_c->received->body;				} else if (search_first_avp(0, rcv_avp, &val)) {					recv = val.s;				} else {					recv = 0;				}				if (ul.update_ucontact(c, e, q, &callid, cseq,						       (fl ? FL_NAT : FL_NONE),						       (fl ? FL_NONE : FL_NAT), _ua, recv, 						       _m->rcv.bind_address) < 0) {					rerrno = R_UL_UPD_C;					LOG(L_ERR, "update(): Error while updating contact\n");					return -8;				}				if (mem_only) {					c->flags |= FL_MEM;				} else {					c->flags &= ~FL_MEM;				}			}		}		_c = get_next_contact(_c);	}	return 0;}