projects
/
project
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
adcfdfd
)
move the instance data structure to instance.h
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 10 Jun 2012 15:12:56 +0000
(17:12 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 10 Jun 2012 15:12:56 +0000
(17:12 +0200)
instance.h
patch
|
blob
|
history
service.h
patch
|
blob
|
history
diff --git
a/instance.h
b/instance.h
index 8016a44c018e655ac5dd7a305bb77bd72c147155..668dde0bbe6355e25e1c7839d12d8d18489b91d1 100644
(file)
--- a/
instance.h
+++ b/
instance.h
@@
-1,6
+1,19
@@
#ifndef __PROCD_INSTANCE_H
#define __PROCD_INSTANCE_H
#ifndef __PROCD_INSTANCE_H
#define __PROCD_INSTANCE_H
+#include <libubox/vlist.h>
+#include <libubox/uloop.h>
+
+struct service_instance {
+ struct vlist_node node;
+ const char *name;
+
+ bool restart;
+ struct blob_attr *config;
+ struct uloop_process proc;
+ struct uloop_timeout timeout;
+};
+
void instance_start(struct service_instance *in);
void instance_stop(struct service_instance *in, bool restart);
bool instance_update(struct service_instance *in, struct service_instance *in_new);
void instance_start(struct service_instance *in);
void instance_stop(struct service_instance *in, bool restart);
bool instance_update(struct service_instance *in, struct service_instance *in_new);
diff --git
a/service.h
b/service.h
index 96175c4713d578d98f326d5745cb15abd298c82d..527e511ac1bcc8b930552de7e4f270554a14dec5 100644
(file)
--- a/
service.h
+++ b/
service.h
@@
-1,3
+1,6
@@
+#ifndef __PROCD_SERVICE_H
+#define __PROCD_SERVICE_H
+
#include <libubox/avl.h>
#include <libubox/vlist.h>
#include <libubox/avl.h>
#include <libubox/vlist.h>
@@
-11,13
+14,4
@@
struct service {
struct vlist_tree instances;
};
struct vlist_tree instances;
};
-struct service_instance {
- struct vlist_node node;
- const char *name;
-
- bool restart;
- struct blob_attr *config;
- struct uloop_process proc;
- struct uloop_timeout timeout;
-};
-
+#endif