rem: DBG("update_location(): Order OK, updating\n");
add: LOG(L_ERR, "update_location(): Order OK, updating\n");
context: int update_location(db_con_t* _c, location_t* _dst, location_t* _src){	contact_t* src_ptr, *dst_ptr, *dst_ptr_prev, *src_ptr_prev;#ifdef PARANOID	if ((!_dst) || (!_src)) {		LOG(L_ERR, "update_location(): Invalid parameter value\n");		return FALSE;	}#endif	if (!_src->contacts) return TRUE;		src_ptr = _src->contacts;	src_ptr_prev = NULL;	while(src_ptr) {		dst_ptr = _dst->contacts;		dst_ptr_prev = NULL;		while(dst_ptr) {			if (cmp_contact(dst_ptr, src_ptr) == TRUE) {				if (check_request_order(dst_ptr, src_ptr) == TRUE) {  /* FIXME */					DBG("update_location(): Order OK, updating\n");					if (src_ptr->expires == 0) {						if (_c) {							if (db_remove_contact(_c, dst_ptr) == FALSE) {								LOG(L_ERR, "update_location(): Error while removing binding\n");								return FALSE;							}						}						     /* FIXME */						if (remove_contact(_dst, dst_ptr->c.s) == FALSE) {							LOG(L_ERR, "update_location(): Error while removing from cache\n");							return FALSE;						}					} else {						if (_c) {							if (db_update_contact(_c, src_ptr) == FALSE) {								LOG(L_ERR, "update_location(): Error while updating database\n");								return FALSE;							}						}						if (update_contact(dst_ptr, src_ptr) == FALSE) {							LOG(L_ERR, "update_location(): Error while updating cache\n");							return FALSE;						}					}					return TRUE;				} else {					DBG("update_location(): Request for binding update is out of order\n");					goto skip;				}			}						dst_ptr_prev = dst_ptr;			dst_ptr = dst_ptr->next;		}		if (src_ptr->expires != 0) {			if (_c) {				if (db_insert_contact(_c, src_ptr) == FALSE) {					LOG(L_ERR, "update_location(): Error inserting into database\n");					return FALSE;				}			}			if (add_contact(_dst, src_ptr->c. s, src_ptr->expires, src_ptr->q, src_ptr->callid, src_ptr->cseq) == FALSE) {				LOG(L_ERR, "update_location(): Error while adding contact\n");				return FALSE;			}		}	skip:		src_ptr_prev = src_ptr;		src_ptr = src_ptr->next;	}	return TRUE;}