Changeset 6c91e6e for otr.c


Ignore:
Timestamp:
2008-02-15T00:45:21Z (12 years ago)
Author:
Sven Moritz Hallberg <sm@…>
Branches:
master
Children:
522a00f
Parents:
f3597a1
Message:

otr_load error handling + stonedcoder copyright notice

File:
1 edited

Legend:

Unmodified
Added
Removed
  • otr.c

    rf3597a1 r6c91e6e  
    77/*
    88  OTR support (cf. http://www.cypherpunks.ca/otr/)
     9 
    910  2008, Sven Moritz Hallberg <pesco@khjk.org>
     11  (c) and funded by stonedcoder.org
    1012   
    1113  files used to store OTR data:
     
    215217        account_t *a;
    216218        gcry_error_t e;
     219        int eno;
    217220
    218221        log_message(LOGLVL_DEBUG, "otr_load '%s'", irc->nick);
     
    220223        g_snprintf(s, 511, "%s%s.otr_keys", global.conf->configdir, irc->nick);
    221224        e = otrl_privkey_read(irc->otr_us, s);
    222         if(e && e!=ENOENT) {
     225        eno = gcry_error_code_to_errno(e);
     226        if(e && eno!=ENOENT) {
    223227                log_message(LOGLVL_ERROR, "otr load: %s: %s", s, strerror(e));
    224228        }
    225229        g_snprintf(s, 511, "%s%s.otr_fprints", global.conf->configdir, irc->nick);
    226230        e = otrl_privkey_read_fingerprints(irc->otr_us, s, NULL, NULL);
    227         if(e && e!=ENOENT) {
     231        eno = gcry_error_code_to_errno(e);
     232        if(e && eno!=ENOENT) {
    228233                log_message(LOGLVL_ERROR, "otr load: %s: %s", s, strerror(e));
    229234        }
     
    14721477        }
    14731478
    1474     irc_usermsg(irc, "  fingerprints: (bold=active)"); 
     1479        irc_usermsg(irc, "  fingerprints: (bold=active)");     
    14751480        show_fingerprints(irc, ctx);
    14761481}
Note: See TracChangeset for help on using the changeset viewer.