summaryrefslogtreecommitdiff
path: root/pullreqd.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-06-09 21:59:53 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2021-06-09 21:59:53 -0400
commit3348b3f64d933a8bdaf0f076646cc0073f161db1 (patch)
treefbbc57841207ad24f377975424231146e90454f1 /pullreqd.c
parentd23940bb9d366037564c2cce3e68adf9c3379182 (diff)
Moved the main loop into a separate function.
Diffstat (limited to 'pullreqd.c')
-rw-r--r--pullreqd.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/pullreqd.c b/pullreqd.c
index 1e9f8e1..635a69c 100644
--- a/pullreqd.c
+++ b/pullreqd.c
@@ -79,6 +79,14 @@ int init_config(char *config_file, config **cfg) {
return (*cfg != NULL);
}
+int main_loop(config *cfg, int listen_socket) {
+ int done = 0;
+
+ for (; !done;) {
+ break;
+ }
+}
+
int main(int argc, char **argv) {
config *cfg;
char *config_file = "test.conf";
@@ -93,13 +101,7 @@ int main(int argc, char **argv) {
/* Did we successfully read the config file? */
if (config_read) {
- int done = 0;
-
- for (; !done;) {
- break;
- }
-
- exit_status = EXIT_SUCCESS;
+ exit_status = main_loop(cfg, listen_socket);
}
syslog(LOG_NOTICE, "pullreqd stopped.");