aboutsummaryrefslogtreecommitdiffstats
path: root/src/cnetz
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-01-13 07:28:31 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-02-18 21:00:58 +0100
commit2d8d7e62c1fc902a8495610f335c6e65cc1003d4 (patch)
tree2b6b9d6c5de26bd4eab6490c9825fd97eb6fd3ad /src/cnetz
parentbc028cd4d3b24f1e632a04bd0eebcb48b0c27ea2 (diff)
Use global init/cleanup function
Diffstat (limited to 'src/cnetz')
-rw-r--r--src/cnetz/main.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/cnetz/main.c b/src/cnetz/main.c
index ba22121..42b4020 100644
--- a/src/cnetz/main.c
+++ b/src/cnetz/main.c
@@ -244,13 +244,9 @@ int main(int argc, char *argv[])
print_image();
/* init functions */
- if (use_mncc_sock) {
- rc = mncc_init("/tmp/bsc_mncc");
- if (rc < 0) {
- fprintf(stderr, "Failed to setup MNCC socket. Quitting!\n");
- goto fail;
- }
- }
+ rc = init_common(station_id, 7);
+ if (rc < 0)
+ goto fail;
scrambler_init();
init_sysinfo();
dsp_init();
@@ -261,11 +257,6 @@ int main(int argc, char *argv[])
}
init_coding();
cnetz_init();
- rc = call_init(station_id, call_audiodev, samplerate, latency, 7, loopback);
- if (rc < 0) {
- fprintf(stderr, "Failed to create call control instance. Quitting!\n");
- goto fail;
- }
/* check for mandatory OgK */
for (i = 0; i < num_kanal; i++) {
@@ -326,9 +317,7 @@ int main(int argc, char *argv[])
fail:
/* cleanup functions */
- call_cleanup();
- if (use_mncc_sock)
- mncc_exit();
+ cleanup_common();
flush_db();