add: } else if (sp->flags&AVPOPS_VAL_STR) {   keys_off = 0; keys_nr = 4; store_vals[0].val.str_val = *sp->val.s;
context: int ops_dbstore_avps (struct sip_msg* msg, struct fis_param *sp,									struct db_param *dbp, int use_domain){	struct sip_uri   uri;	struct usr_avp   **avp_list;	struct usr_avp   *avp;	unsigned short   name_type;	int_str          i_s;	str              uuid;	int              keys_off;	int              keys_nr;	int              n;		if (sp->flags&AVPOPS_VAL_NONE)	{		/* get and parse uri */		if (parse_source_uri( msg, sp->flags, &uri)<0 )		{			LOG(L_ERR,"ERROR:avpops:store_avps: failed to get uri\n");			goto error;		}		/* set values for keys  */		keys_off = 1;		store_vals[4].val.str_val =			(sp->flags&AVPOPS_FLAG_DOMAIN)?empty:uri.user;		if (use_domain || sp->flags&AVPOPS_FLAG_DOMAIN)		{			store_vals[5].val.str_val = uri.host;			keys_nr = 5;		} else {			keys_nr = 4;		}	} else if (sp->flags&AVPOPS_VAL_AVP) {		/* get uuid from avp */		if (get_avp_as_str(sp, &uuid)<0)		{			LOG(L_ERR,"ERROR:avpops:store_avps: failed to get uuid\n");			goto error;		}		/* set values for keys  */		keys_off = 0;		keys_nr = 4;		store_vals[0].val.str_val = uuid;	} else {		LOG(L_CRIT,"BUG:avpops:store_avps: invalid flag combination (%d)\n",			sp->flags);		goto error;	}	/* set uuid/(username and domain) fields */	n =0 ;	if ((dbp->a.flags&AVPOPS_VAL_NONE)==0)	{		/* avp name is known ->set it and its type */		name_type = (((dbp->a.flags&AVPOPS_VAL_INT))?0:AVP_NAME_STR);		store_vals[1].val.str_val = dbp->sa; /*attr name*/		avp = search_first_avp( name_type, dbp->a.val, &i_s);		for( ; avp; avp=search_next_avp(avp,&i_s))		{			/* don't insert avps which were loaded */			if (avp->flags&AVP_IS_IN_DB)				continue;			/* set type */			store_vals[3].val.int_val =				(avp->flags&AVP_NAME_STR?0:AVPOPS_DB_NAME_INT)|				(avp->flags&AVP_VAL_STR?0:AVPOPS_DB_VAL_INT);			/* set value */			int_str2db_val( i_s, &store_vals[2].val.str_val,				avp->flags&AVP_VAL_STR);			/* save avp */			if (db_store_avp( store_keys+keys_off, store_vals+keys_off,					keys_nr, dbp->table.s)==0 )			{				avp->flags |= AVP_IS_IN_DB;				n++;			}		}	} else {		/* avp name is unknown -> go through all list */		avp_list = get_avp_list();		avp = *avp_list;		for ( ; avp ; avp=avp->next )		{			/* don't insert avps which were loaded */			if (avp->flags&AVP_IS_IN_DB)				continue;			/* check if type match */			if ( !( (dbp->a.flags&(AVPOPS_VAL_INT|AVPOPS_VAL_STR))==0 ||				((dbp->a.flags&AVPOPS_VAL_INT)&&((avp->flags&AVP_NAME_STR))==0)				||((dbp->a.flags&AVPOPS_VAL_STR)&&(avp->flags&AVP_NAME_STR))))				continue;			/* set attribute name and type */			if ( (i_s.s=get_avp_name(avp))==0 )				i_s.n = avp->id;			int_str2db_val( i_s, &store_vals[1].val.str_val,				avp->flags&AVP_NAME_STR);			store_vals[3].val.int_val =				(avp->flags&AVP_NAME_STR?0:AVPOPS_DB_NAME_INT)|				(avp->flags&AVP_VAL_STR?0:AVPOPS_DB_VAL_INT);			/* set avp value */			get_avp_val( avp, &i_s);			int_str2db_val( i_s, &store_vals[2].val.str_val,				avp->flags&AVP_VAL_STR);			/* save avp */			if (db_store_avp( store_keys+keys_off, store_vals+keys_off,			keys_nr, dbp->table.s)==0)			{				avp->flags |= AVP_IS_IN_DB;				n++;			}		}	}	DBG("DEBUG:avpops:store_avps: %d avps were stored\n",n);	return n==0?-1:1;error:	return -1;}