rem: t = uac_get_T();
add: t = uac_tmb.t_gett();
context: int uac_auth( struct sip_msg *msg){	static struct authenticate_body auth;	struct uac_credential *crd;	int picked_code, picked_br, b;	struct sip_msg *rpl;	struct cell *t;	struct hdr_field *hdr;	HASHHEX response;	str *new_hdr;	/* get transaction */	t = uac_get_T();	if (t==T_UNDEFINED || t==T_NULL_CELL)	{		LOG(LOG_CRIT,"BUG:uac:uac_auth: no current transaction found\n");		goto error;	}	/* pick the selected reply */	picked_br = -1;	picked_code = 999;	for ( b=0; b<t->nr_of_outgoings ; b++ )	{		/* skip 'empty branches' */		if (!t->uac[b].request.buffer)			continue;		/* there is still an unfinished UAC transaction? */		if ( t->uac[b].last_received<200 )		{			LOG(L_CRIT,"BUG:uac:uac_auth: incomplet transaction in failure "				"route\n");			goto error;		}		if ( t->uac[b].last_received<picked_code )		{			picked_br = b;			picked_code = t->uac[b].last_received;		}	}	if (picked_br<0)	{		LOG(L_CRIT,"BUG:uac:uac_auth: empty transaction in failure "			"route\n");		goto error;	}	rpl = t->uac[picked_br].reply;	DBG("DEBUG:uac:uac_auth: picked reply is %p, code %d\n",rpl,picked_code);	if (rpl==0)	{		LOG(L_CRIT,"BUG:uac:uac_auth: empty reply on picked branch\n");		goto error;	}	if (rpl==FAKED_REPLY)	{		LOG(L_ERR,"ERROR:uac:uac_auth: cannot process a FAKED reply\n");		goto error;	}	hdr = get_autenticate_hdr( rpl, picked_code);	if (hdr==0)	{		LOG( L_ERR,"ERROR:uac:uac_auth: failed to extract authenticate hdr\n");		goto error;	}	DBG("DEBUG:uac:uac_auth: header found; body=<%.*s>\n",		hdr->body.len, hdr->body.s);	if (parse_authenticate_body( &hdr->body, &auth)<0)	{		LOG(L_ERR,"ERROR:uac:uac_auth: failed to parse auth hdr body\n");		goto error;	}	/* can we authenticate this realm? */	crd = lookup_realm( &auth.realm );	if (crd==0)	{		LOG(L_ERR,"ERROR:uac:uac_auth: no credential for realm \"%.*s\"\n",			auth.realm.len, auth.realm.s);		goto error;	}	/* do authentication */	do_uac_auth( msg, &t->uac[picked_br].uri, crd, &auth, response);	/* build the authorization header */	new_hdr = build_authorization_hdr( picked_code, &t->uac[picked_br].uri,		crd, &auth, response);	if (new_hdr==0)	{		LOG(L_ERR,"ERROR:uac:uac_auth: failed to build authorization hdr\n");		goto error;	}	/* so far, so good -> add the header and set the proper RURI */	if ( apply_urihdr_changes( msg, &t->uac[picked_br].uri, new_hdr)<0 )	{		LOG(L_ERR,"ERROR:uac:uac_auth: failed to apply changes\n");		goto error;	}	return 0;error:	return -1;}