main_common: Move init and cleanup function to main function
This commit is contained in:
@@ -348,9 +348,6 @@ int main(int argc, char *argv[])
|
||||
print_image();
|
||||
|
||||
/* init functions */
|
||||
rc = init_common(station_id, 7);
|
||||
if (rc < 0)
|
||||
goto fail;
|
||||
rc = init_frame();
|
||||
if (rc < 0) {
|
||||
fprintf(stderr, "Failed to setup frames. Quitting!\n");
|
||||
@@ -380,7 +377,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
nmt_check_channels();
|
||||
|
||||
main_common(&quit, latency, interval, myhandler);
|
||||
main_common(&quit, latency, interval, myhandler, station_id, 7);
|
||||
|
||||
fail:
|
||||
/* fifo */
|
||||
@@ -388,9 +385,6 @@ fail:
|
||||
close(sms_deliver_fd);
|
||||
unlink(SMS_DELIVER);
|
||||
|
||||
/* cleanup functions */
|
||||
cleanup_common();
|
||||
|
||||
/* destroy transceiver instance */
|
||||
while (sender_head)
|
||||
nmt_destroy(sender_head);
|
||||
|
Reference in New Issue
Block a user