assuan_read_from_server() and return value
Ben Kibbey
bjk at luxsci.net
Fri Nov 23 20:01:04 CET 2007
I'm using assuan_transact() to process an inquire command. After the
command is finished, assuan_transact() sends "END" then reads the next
line from the server via assuan_read_from_server().
assuan_read_from_server() will parse an ERR line, but won't do anything
with the error code. Attached is a patch that'll return the server error
code. Doesn't seem to break anything.
Index: assuan-client.c
===================================================================
--- assuan-client.c (revision 278)
+++ assuan-client.c (working copy)
@@ -86,6 +86,7 @@
*off = 3;
while (line[*off] == ' ')
++*off;
+ rc = atoi(line+ (*off));
}
else if (linelen >= 7
&& line[0] == 'I' && line[1] == 'N' && line[2] == 'Q'
--
Benjamin J. Kibbey bjk at luxsci.net/jabber/freenode
3019 F5FC AA33 5BC7 BE9F 09D2 393E DBD2 40D5 FA7E
More information about the Gnupg-devel
mailing list