Changeset 12cc58b


Ignore:
Timestamp:
2008-02-17T10:52:28Z (12 years ago)
Author:
Sven Moritz Hallberg <sm@…>
Branches:
master
Children:
4d8fbe8
Parents:
9e64011
Message:

don't unnecessarily duplicate otr userstate in keygen slave

File:
1 edited

Legend:

Unmodified
Added
Removed
  • otr.c

    r9e64011 r12cc58b  
    112112
    113113/* main function for the forked keygen slave */
    114 void keygen_child_main(const char *nick, int infd, int outfd);
     114void keygen_child_main(OtrlUserState us, int infd, int outfd);
    115115
    116116/* mainloop handler for when a keygen finishes */
     
    15201520                        /* child process */
    15211521                        signal(SIGTERM, exit);
    1522                         keygen_child_main(irc->nick, to[0], from[1]);
     1522                        keygen_child_main(irc->otr->us, to[0], from[1]);
    15231523                        exit(0);
    15241524                }
     
    15511551}
    15521552
    1553 void keygen_child_main(const char *nick, int infd, int outfd)
    1554 {
    1555         OtrlUserState us;
    1556         char *kf;
     1553void keygen_child_main(OtrlUserState us, int infd, int outfd)
     1554{
    15571555        FILE *input, *output;
    15581556        char filename[128], accountname[512], protocol[512];
    15591557        gcry_error_t e;
    15601558        int tempfd;
    1561        
    1562         us = otrl_userstate_create();
    1563         kf = g_strdup_printf("%s%s.otr_keys", global.conf->configdir, nick);
    1564         otrl_privkey_read(us, kf);
    1565         g_free(kf);
    15661559       
    15671560        input = fdopen(infd, "r");
Note: See TracChangeset for help on using the changeset viewer.