summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 44d764e..db4c438 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,15 +2,30 @@
#include "main.h"
-int main_loop(void) {
+int init(void) {
+ if (modem_manager_init(CHANNELS) < 0)
+ return -1;
+
+}
- int fd = -1;
+void done(void) {
- if ((fd = modem_open(NULL)) < 0)
- daemon_log
+ modem_manager_done(CHANNELS);
+
+}
+
+int main_loop(void) {
+ if (init() < 0)
+ return -1;
+
+ for (;;) {
+ /* ... */
+ }
+
+ done();
}
int main(int argc, char*argv[]) {