From 34d938d18bb1c391b9506b9aedf1ce58532765c5 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Thu, 13 Jun 2013 08:00:47 -0300 Subject: [PATCH] Fix key for type of identification. It's called tp_ni, not tipo_ni. --- doc/FORMATO | 2 +- rnet_encode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/FORMATO b/doc/FORMATO index 5771993..3533068 100644 --- a/doc/FORMATO +++ b/doc/FORMATO @@ -20,7 +20,7 @@ C: (6 bytes) + deflate(hash) hash_arq = 16 bytes hash_trans = 16 bytes == hash_arq ni = "00000000000" (CPF em ascii) - tipo_ni = "CPF" + tp_ni = "CPF" num_ass = 0x00 (assinatura e-CPF?) p_comp = 0x00 0x00 0x00 0x00 ret = 0x00 diff --git a/rnet_encode.c b/rnet_encode.c index 3f75a13..e9e5bdb 100644 --- a/rnet_encode.c +++ b/rnet_encode.c @@ -70,7 +70,7 @@ int rnet_encode(struct rnet_decfile *decfile, struct rnet_message **msg) r = rnet_message_add_buffer(msg, "hash_arq", hash, 16); r = rnet_message_add_buffer(msg, "hash_trans", hash, 16); r = rnet_message_add_ascii(msg, "ni", cpf); - r = rnet_message_add_ascii(msg, "tipo_ni", "CPF"); + r = rnet_message_add_ascii(msg, "tp_ni", "CPF"); r = rnet_message_add_u8(msg, "num_ass", 0); r = rnet_message_add_u32(msg, "p_comp", 0); r = rnet_message_add_u8(msg, "ret", 0); -- 2.20.1