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:
5c40cd4
)
add debug
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 24 Jun 2012 21:50:18 +0000
(23:50 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 24 Jun 2012 21:50:18 +0000
(23:50 +0200)
CMakeLists.txt
patch
|
blob
|
history
service.c
patch
|
blob
|
history
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index
aaa3982
..
d0b951b
100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-1,7
+1,7
@@
cmake_minimum_required(VERSION 2.6)
PROJECT(procd C)
cmake_minimum_required(VERSION 2.6)
PROJECT(procd C)
-ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations)
+ADD_DEFINITIONS(-Os -
ggdb -
Wall -Werror --std=gnu99 -Wmissing-declarations)
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
diff --git
a/service.c
b/service.c
index
aeef7a7
..
66ea204
100644
(file)
--- a/
service.c
+++ b/
service.c
@@
-36,12
+36,15
@@
service_instance_update(struct vlist_tree *tree, struct vlist_node *node_new,
in_n = container_of(node_new, struct service_instance, node);
if (in_o && in_n) {
in_n = container_of(node_new, struct service_instance, node);
if (in_o && in_n) {
+ DPRINTF("Update instance %s::%s\n", in_o->srv->name, in_o->name);
instance_update(in_o, in_n);
instance_free(in_n);
} else if (in_o) {
instance_update(in_o, in_n);
instance_free(in_n);
} else if (in_o) {
+ DPRINTF("Free instance %s::%s\n", in_o->srv->name, in_o->name);
instance_stop(in_o, false);
instance_free(in_o);
} else if (in_n) {
instance_stop(in_o, false);
instance_free(in_o);
} else if (in_n) {
+ DPRINTF("Create instance %s::%s\n", in_o->srv->name, in_o->name);
instance_start(in_n);
}
}
instance_start(in_n);
}
}
@@
-128,9
+131,12
@@
service_handle_set(struct ubus_context *ctx, struct ubus_object *obj,
name = blobmsg_data(cur);
s = avl_find_element(&services, name, s, avl);
name = blobmsg_data(cur);
s = avl_find_element(&services, name, s, avl);
- if (s)
+ if (s) {
+ DPRINTF("Update service %s\n", name);
return service_update(s, msg, tb);
return service_update(s, msg, tb);
+ }
+ DPRINTF("Create service %s\n", name);
s = service_alloc(name);
if (!s)
return UBUS_STATUS_UNKNOWN_ERROR;
s = service_alloc(name);
if (!s)
return UBUS_STATUS_UNKNOWN_ERROR;