=== modified file 'unix.c'
|
|
|
80 | 80 | nogaim_init(); |
81 | 81 | #endif |
82 | 82 | |
83 | | /* Ugly Note: libotr and gnutls both use libgcrypt. libgcrypt |
84 | | has a process-global config state whose initialization happpens |
85 | | twice if libotr and gnutls are used together. libotr installs custom |
86 | | memory management functions for libgcrypt while our gnutls module |
87 | | uses the defaults. Therefore we initialize OTR after SSL. *sigh* */ |
88 | | ssl_init(); |
89 | | #ifdef OTR_BI |
90 | | otr_init(); |
91 | | #endif |
92 | | /* And in case OTR is loaded as a plugin, it'll also get loaded after |
93 | | this point. */ |
94 | | |
| 83 | // bug ticket #785: ssl_init() and otr_init() moved further down until |
| 84 | // after fork() |
| 85 | // FIXME: any side-effects esp. regarding running in "forking daemon" mode |
| 86 | // have NOT been investigated |
95 | 87 | srand( time( NULL ) ^ getpid() ); |
96 | 88 | |
97 | 89 | global.helpfile = g_strdup( HELP_FILE ); |
… |
… |
|
155 | 147 | setuid( pw->pw_uid ); |
156 | 148 | } |
157 | 149 | } |
| 150 | |
| 151 | /* Ugly Note: libotr and gnutls both use libgcrypt. libgcrypt |
| 152 | has a process-global config state whose initialization happpens |
| 153 | twice if libotr and gnutls are used together. libotr installs custom |
| 154 | memory management functions for libgcrypt while our gnutls module |
| 155 | uses the defaults. Therefore we initialize OTR after SSL. *sigh* */ |
| 156 | ssl_init(); |
| 157 | #ifdef OTR_BI |
| 158 | otr_init(); |
| 159 | #endif |
| 160 | /* And in case OTR is loaded as a plugin, it'll also get loaded after |
| 161 | this point. */ |
158 | 162 | |
159 | 163 | /* Catch some signals to tell the user what's happening before quitting */ |
160 | 164 | memset( &sig, 0, sizeof( sig ) ); |