[Spice-devel] [PATCH spice-common 2/2] Fix field names for Smartcard protocol structures

Eduardo Lima (Etrunko) etrunko at redhat.com
Thu May 17 14:38:03 UTC 2018


Rename struct VSCMsgReaderAdd field 'reader_name' to 'name', and struct
VSCMsgATR field 'data' to 'atr' to match their definitions in file
vscard_common.h.

The error log follows:

generated_server_demarshallers.c:1985:30: note: each undeclared identifier is reported only once for each function it appears in
generated_server_demarshallers.c:1994:15: error: ‘VSCMsgReaderAdd {aka struct VSCMsgReaderAdd}’ has no member named ‘reader_name’
     memcpy(out->reader_name, in, reader_name__nelements);
               ^~

Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
---
 spice.proto | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/spice.proto b/spice.proto
index 69f169e..6ee4766 100644
--- a/spice.proto
+++ b/spice.proto
@@ -1383,11 +1383,11 @@ struct VscMessageAPDU {
 } @ctype(VSCMsgAPDU);
 
 struct VscMessageATR {
-    uint8 data[];
+    uint8 atr[];
 } @ctype(VSCMsgATR);
 
 struct VscMessageReaderAdd {
-    int8 *reader_name[] @zero_terminated @nonnull @end @nomarshal;
+    int8 *name[] @zero_terminated @nonnull @end @nomarshal;
 } @ctype(VSCMsgReaderAdd);
 
 channel SmartcardChannel : BaseChannel {
@@ -1435,7 +1435,7 @@ channel SmartcardChannel : BaseChannel {
     } @ctype(VSCMsgATR) atr = 101;
 
     message {
-	int8 reader_name[] @zero_terminated @nonnull;
+	int8 name[] @zero_terminated @nonnull;
     } @ctype(VSCMsgReaderAdd) reader_add = 101;
 */
 } @ifdef(USE_SMARTCARD);
-- 
2.14.3



More information about the Spice-devel mailing list