summaryrefslogtreecommitdiffstats
path: root/src/main.c
blob: db4c43805e9dd42e22ae6ac6534ac11faaac570b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <libdaemon/dlog.h>

#include "main.h"

int init(void) {
    if (modem_manager_init(CHANNELS) < 0)
        return -1;
    
}

void done(void) {

    modem_manager_done(CHANNELS);
    
}

int main_loop(void) {


    if (init() < 0)
        return -1;

    for (;;) {
        /* ... */
    }
    

    done();
}

int main(int argc, char*argv[]) {
    return main_loop() < 0 : 1 : 0;
}