rem: TRACE_LOG("  created VS to %.*s\n", FMT_STR(uri));
add: DEBUG_LOG("  created VS to %.*s\n", FMT_STR(uri));
context: int db_load_vs(db_con_t *rls_db, rl_subscription_t *s){	int i, r = 0;	db_res_t *res = NULL;	virtual_subscription_t *vs;	db_key_t result_cols[] = { 		"id", "uri"	};	db_key_t keys[] = { "rls_id" };	db_op_t ops[] = { OP_EQ };	db_val_t k_vals[] = { 		{ DB_STR, 0, 			{ .str_val = { s: s->dbid, len: strlen(s->dbid) } } 		} 	};	if (rls_dbf.use_table(rls_db, vs_table) < 0) {		LOG(L_ERR, "vs_load_vs: Error in use_table\n");		return -1;	}	if (rls_dbf.query (rls_db, keys,ops, k_vals,			result_cols, 1, sizeof(result_cols) / sizeof(db_key_t), 			0, &res) < 0) {		LOG(L_ERR, "db_load_vs: Error while querying presentity\n");		r = -1;		res = NULL;	}	if (res) {		for (i = 0; i < res->n; i++) {			db_row_t *row = &res->rows[i];			db_val_t *row_vals = ROW_VALUES(row);			str id = STR_NULL;			str uri = STR_NULL;			get_str_val(row_vals[0], id);			get_str_val(row_vals[1], uri);						r = vs_create(&uri, rls_get_package(s), &vs, NULL, s) | r;			if ((r != 0) || (!vs)) { r = -1; break; }						strcpy(vs->dbid, id.s);			TRACE_LOG("  created VS to %.*s\n", FMT_STR(uri));					ptr_vector_add(&s->vs, vs);						db_load_vs_names(rls_db, vs);			}		rls_dbf.free_result(rls_db, res);	}		return r;}