Skip to main content
summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorEugene Tarassov2011-11-28 18:56:42 -0500
committerEugene Tarassov2011-11-28 18:56:42 -0500
commitf42b051a2d5fe26988d15e1d2eaaa01f9f27d62c (patch)
tree66dfe5e66f6111efe4ea088caab6befc7e00a07d /server
parent0f5d669545af0001a55d5a056847d5a474093095 (diff)
downloadorg.eclipse.tcf.agent-f42b051a2d5fe26988d15e1d2eaaa01f9f27d62c.tar.gz
org.eclipse.tcf.agent-f42b051a2d5fe26988d15e1d2eaaa01f9f27d62c.tar.xz
org.eclipse.tcf.agent-f42b051a2d5fe26988d15e1d2eaaa01f9f27d62c.zip
TCF Server: fixed: the server must update memory map when path map changes.
Diffstat (limited to 'server')
-rw-r--r--server/tcf/services/context-proxy.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/server/tcf/services/context-proxy.c b/server/tcf/services/context-proxy.c
index 27c0f10d..11211f21 100644
--- a/server/tcf/services/context-proxy.c
+++ b/server/tcf/services/context-proxy.c
@@ -1529,8 +1529,24 @@ static void event_context_disposed(Context * ctx, void * args) {
free_context_cache(c);
}
+static void event_path_mapping_changed(Channel * c, void * args) {
+ LINK * x = context_root.next;
+ while (x != &context_root) {
+ Context * ctx = ctxl2ctxp(x);
+ ContextCache * p = *EXT(ctx);
+ if (p->mmap_is_valid) {
+ crear_memory_map_data(p);
+ memory_map_event_mapping_changed(ctx);
+ }
+ x = x->next;
+ }
+}
+
void init_contexts_sys_dep(void) {
- static ContextEventListener listener = {
+ static PathMapEventListener path_map_listener = {
+ event_path_mapping_changed,
+ };
+ static ContextEventListener context_event_listener = {
NULL,
event_context_exited,
NULL,
@@ -1538,7 +1554,8 @@ void init_contexts_sys_dep(void) {
NULL,
event_context_disposed
};
- add_context_event_listener(&listener, NULL);
+ add_path_map_event_listener(&path_map_listener, NULL);
+ add_context_event_listener(&context_event_listener, NULL);
add_channel_close_listener(channel_close_listener);
context_extension_offset = context_extension(sizeof(ContextCache *));
}

Back to the top