diff options
Diffstat (limited to 'plugins/MirOTR/libotr/src')
-rw-r--r-- | plugins/MirOTR/libotr/src/instag.c | 7 | ||||
-rw-r--r-- | plugins/MirOTR/libotr/src/message.c | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/plugins/MirOTR/libotr/src/instag.c b/plugins/MirOTR/libotr/src/instag.c index cccd94fb6c..5538158f7c 100644 --- a/plugins/MirOTR/libotr/src/instag.c +++ b/plugins/MirOTR/libotr/src/instag.c @@ -90,12 +90,13 @@ gcry_error_t otrl_instag_read(OtrlUserState us, const char *filename) * OtrlUserState. The FILE* must be open for reading. */ gcry_error_t otrl_instag_read_FILEp(OtrlUserState us, FILE *instf) { - if (!instf) return gcry_error(GPG_ERR_NO_ERROR); - - OtrlInsTag *p; + + OtrlInsTag *p; char storeline[1000]; size_t maxsize = sizeof(storeline); + if (!instf) return gcry_error(GPG_ERR_NO_ERROR); + while(fgets(storeline, maxsize, instf)) { char *prevpos; char *pos; diff --git a/plugins/MirOTR/libotr/src/message.c b/plugins/MirOTR/libotr/src/message.c index c44ce7b8fc..6cc8165c27 100644 --- a/plugins/MirOTR/libotr/src/message.c +++ b/plugins/MirOTR/libotr/src/message.c @@ -467,9 +467,10 @@ static gcry_error_t send_or_error_auth(const OtrlMessageAppOps *ops, if (!err) { const char *msg = context->auth.lastauthmsg; if (msg && *msg) { + time_t now; fragment_and_send(ops, opdata, context, msg, OTRL_FRAGMENT_SEND_ALL, NULL); - time_t now = time(NULL); + now = time(NULL); /* Update the "last sent" fields, unless this is a version 3 * message typing to update the master context (as happens * when sending a v3 COMMIT message, for example). */ |