rlc: Test the basic of the gprs_rlc_v_n code for remembering the state
diff --git a/src/encoding.cpp b/src/encoding.cpp
index 27c3ecd..13390b9 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -386,8 +386,6 @@
 	for (i = 0, bbn = (tbf->dir.ul.window.v_r() - 64) & mod_sns_half; i < 64;
 	     i++, bbn = (bbn + 1) & mod_sns_half) {
 		bit = tbf->dir.ul.v_n.state(bbn);
-		if (bit == 0)
-			bit = ' ';
 		show_v_n[i] = bit;
 		if (bit == 'R')
 			rbb = (rbb << 1)|1;
diff --git a/src/rlc.cpp b/src/rlc.cpp
index fda743f..f29af62 100644
--- a/src/rlc.cpp
+++ b/src/rlc.cpp
@@ -138,3 +138,8 @@
 	}
 	show_v_b[i] = '\0';
 }
+
+void gprs_rlc_v_n::reset()
+{
+	memset(m_v_n, 0x0, sizeof(m_v_n));
+}
diff --git a/src/rlc.h b/src/rlc.h
index d9e0e6c..e1974e4 100644
--- a/src/rlc.h
+++ b/src/rlc.h
@@ -130,6 +130,8 @@
 };
 
 struct gprs_rlc_v_n {
+	void reset();
+
 	void mark_received(int index);
 	void mark_missing(int index);
 
@@ -357,5 +359,8 @@
 
 inline char gprs_rlc_v_n::state(int index) const
 {
-	return m_v_n[index];
+	char bit = m_v_n[index];
+	if (bit == '\0')
+		return ' ';
+	return bit;
 }
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index 517f8ea..8f6aec2 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -115,12 +115,32 @@
 	}
 }
 
+static void test_rlc_v_n()
+{
+	{
+		gprs_rlc_v_n vn;
+		vn.reset();
+
+		OSMO_ASSERT(!vn.is_received(0x23));
+		OSMO_ASSERT(vn.state(0x23) == ' ');
+
+		vn.mark_received(0x23);
+		OSMO_ASSERT(vn.is_received(0x23));
+		OSMO_ASSERT(vn.state(0x23) == 'R');
+
+		vn.mark_missing(0x23);
+		OSMO_ASSERT(!vn.is_received(0x23));
+		OSMO_ASSERT(vn.state(0x23) == 'N');
+	}
+}
+
 int main(int argc, char **argv)
 {
 	printf("Making some basic type testing.\n");
 	test_llc();
 	test_rlc();
 	test_rlc_v_b();
+	test_rlc_v_n();
 	return EXIT_SUCCESS;
 }