Mercurial > audlegacy-plugins
comparison src/flac113/plugin.c @ 207:063e31ae8f92 trunk
[svn] Properly zero out proxy configuration strings if no value is retrieved, otherwise we crash and burn on shutdown.
| author | chainsaw |
|---|---|
| date | Fri, 03 Nov 2006 15:33:42 -0800 |
| parents | 117bc56d906b |
| children | 6612ede1b934 |
comparison
equal
deleted
inserted
replaced
| 206:f258fef5c5fc | 207:063e31ae8f92 |
|---|---|
| 245 } | 245 } |
| 246 bmp_cfg_db_get_bool(db, "flac", "stream.cast_title_streaming", &flac_cfg.stream.cast_title_streaming); | 246 bmp_cfg_db_get_bool(db, "flac", "stream.cast_title_streaming", &flac_cfg.stream.cast_title_streaming); |
| 247 bmp_cfg_db_get_bool(db, "flac", "stream.use_udp_channel", &flac_cfg.stream.use_udp_channel); | 247 bmp_cfg_db_get_bool(db, "flac", "stream.use_udp_channel", &flac_cfg.stream.use_udp_channel); |
| 248 | 248 |
| 249 bmp_cfg_db_get_bool(db, NULL, "use_proxy", &flac_cfg.stream.use_proxy); | 249 bmp_cfg_db_get_bool(db, NULL, "use_proxy", &flac_cfg.stream.use_proxy); |
| 250 bmp_cfg_db_get_string(db, NULL, "proxy_host", &flac_cfg.stream.proxy_host); | 250 if(!bmp_cfg_db_get_string(db, NULL, "proxy_host", &flac_cfg.stream.proxy_host)) |
| 251 flac_cfg.stream.proxy_host = NULL; | |
| 252 | |
| 251 bmp_cfg_db_get_string(db, NULL, "proxy_port", &tmp); | 253 bmp_cfg_db_get_string(db, NULL, "proxy_port", &tmp); |
| 254 if (tmp != NULL) | |
| 255 flac_cfg.stream.proxy_port = atoi(tmp); | |
| 252 | 256 |
| 253 bmp_cfg_db_get_bool(db, NULL, "proxy_use_auth", &flac_cfg.stream.proxy_use_auth); | 257 bmp_cfg_db_get_bool(db, NULL, "proxy_use_auth", &flac_cfg.stream.proxy_use_auth); |
| 254 bmp_cfg_db_get_string(db, NULL, "proxy_user", &flac_cfg.stream.proxy_user); | 258 if(!bmp_cfg_db_get_string(db, NULL, "proxy_user", &flac_cfg.stream.proxy_user)) |
| 255 bmp_cfg_db_get_string(db, NULL, "proxy_pass", &flac_cfg.stream.proxy_pass); | 259 flac_cfg.stream.proxy_user = NULL; |
| 260 if(!bmp_cfg_db_get_string(db, NULL, "proxy_pass", &flac_cfg.stream.proxy_pass)) | |
| 261 flac_cfg.stream.proxy_pass = NULL; | |
| 256 | 262 |
| 257 decoder_ = FLAC__stream_decoder_new(); | 263 decoder_ = FLAC__stream_decoder_new(); |
| 258 bmp_cfg_db_close(db); | 264 bmp_cfg_db_close(db); |
| 259 } | 265 } |
| 260 | 266 |
