diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2011-09-22 10:39:44 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2011-11-09 20:10:16 +0100 |
commit | 50a5cac2445bc0c199958ac04d5127e4be09fb1e (patch) | |
tree | 84e32e498be8f6de52569aa0dda8d64b04da535c /src/main.c | |
parent | 1679beb2887f04c322acc06593a36ce80b0129ea (diff) | |
download | pianobar-50a5cac2445bc0c199958ac04d5127e4be09fb1e.tar.gz pianobar-50a5cac2445bc0c199958ac04d5127e4be09fb1e.tar.bz2 pianobar-50a5cac2445bc0c199958ac04d5127e4be09fb1e.zip |
waitress: Initial TLS implementation (using gnutls)
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -338,11 +338,16 @@ int main (int argc, char **argv) { /* init some things */ ao_initialize (); +#ifdef ENABLE_TLS + gnutls_global_init (); +#endif PianoInit (&app.ph); WaitressInit (&app.waith); app.waith.url.host = strdup (PIANO_RPC_HOST); - app.waith.url.port = strdup (PIANO_RPC_PORT); +#ifdef ENABLE_TLS + app.waith.url.tls = true; +#endif BarSettingsInit (&app.settings); BarSettingsRead (&app.settings); @@ -384,6 +389,9 @@ int main (int argc, char **argv) { PianoDestroyPlaylist (app.songHistory); PianoDestroyPlaylist (app.playlist); ao_shutdown(); +#ifdef ENABLE_TLS + gnutls_global_deinit (); +#endif BarSettingsDestroy (&app.settings); /* restore terminal attributes, zsh doesn't need this, bash does... */ |