diff options
author | Werner Koch <wk@gnupg.org> | 2002-03-06 15:15:14 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2002-03-06 15:15:14 +0100 |
commit | 7a5d7787a0f124b756bff56f9f2a9c982544d2a1 (patch) | |
tree | 859771ea921477f52d5b04e170260ba0bd9628e4 /assuan | |
parent | Decryption using a Cryptoflex card does now work. (diff) | |
download | gnupg2-7a5d7787a0f124b756bff56f9f2a9c982544d2a1.tar.xz gnupg2-7a5d7787a0f124b756bff56f9f2a9c982544d2a1.zip |
* assuan-client.c (_assuan_read_from_server): Detect END.
(assuan_transact): Pass it to the data callback.
Diffstat (limited to 'assuan')
-rw-r--r-- | assuan/ChangeLog | 5 | ||||
-rw-r--r-- | assuan/assuan-client.c | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/assuan/ChangeLog b/assuan/ChangeLog index 867f1250c..b5686c5e3 100644 --- a/assuan/ChangeLog +++ b/assuan/ChangeLog @@ -1,3 +1,8 @@ +2002-03-06 Werner Koch <wk@gnupg.org> + + * assuan-client.c (_assuan_read_from_server): Detect END. + (assuan_transact): Pass it to the data callback. + 2002-02-27 Werner Koch <wk@gnupg.org> * assuan-client.c (assuan_transact): Add 2 more arguments to diff --git a/assuan/assuan-client.c b/assuan/assuan-client.c index 41984fdac..6c7a6e3e8 100644 --- a/assuan/assuan-client.c +++ b/assuan/assuan-client.c @@ -95,6 +95,13 @@ _assuan_read_from_server (ASSUAN_CONTEXT ctx, int *okay, int *off) while (line[*off] == ' ') ++*off; } + else if (linelen >= 3 + && line[0] == 'E' && line[1] == 'N' && line[2] == 'D' + && (line[3] == '\0' || line[3] == ' ')) + { + *okay = 5; /* end line */ + *off = 3; + } else rc = ASSUAN_Invalid_Response; return rc; @@ -201,6 +208,18 @@ assuan_transact (ASSUAN_CONTEXT ctx, if (!rc) goto again; } + else if (okay == 5) + { + if (!data_cb) + rc = ASSUAN_No_Data_Callback; + else + { + rc = data_cb (data_cb_arg, NULL, 0); + if (!rc) + goto again; + } + } return rc; } + |