summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2003-12-14 18:55:52 +0000
committerLennart Poettering <lennart@poettering.net>2003-12-14 18:55:52 +0000
commit90f9acf2051d0145fa0ffa14ee0da153406006c1 (patch)
tree5fcb3223fd3aeda48fe59e64489def79c67343b0 /src/main.c
parent865c4b3ad3a26c1f2e91ed247fb2d1d14a8ec3fd (diff)
some work
git-svn-id: file:///home/lennart/svn/public/ivam2/trunk@3 dbf6933d-3bce-0310-9bcc-ed052ba35b35
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[]) {