diff options
author | Sergiu Ivanov <unlimitedscolobb@gmail.com> | 2008-10-10 21:11:03 +0300 |
---|---|---|
committer | Sergiu Ivanov <unlimitedscolobb@gmail.com> | 2008-10-10 21:11:03 +0300 |
commit | d60dd9120b1a50c92b0aefdc3a76618d74b5e0f1 (patch) | |
tree | bcc6b8acd73e7e1d6e1e7142ce22e3268e1eb3f8 | |
parent | b973a117cae3021b87d408af573bb1dbe153c132 (diff) |
Added the code for recognizing non-root nodes to netfs_S_file_get_translator_cntl
Now netfs_file_get_translator_cntl will recognize whether it
is called for the root node or not. In case the node it is
called on is not the root, it will call file_get_translator_cntl
on the real node, so that filters could trace translator stacks
on real nodes.
-rw-r--r-- | nsmux.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -1727,6 +1727,25 @@ netfs_S_file_get_translator_cntl /*Obtain the node for which we are called*/ node_t * np = user->po->np; + /*If the node is not the root node of nsmux*/ + if(np != netfs_root_node) + { + /*the control port to the translator sitting on the real node*/ + mach_port_t p; + + /*obtain the control port for the translator sitting on the real node*/ + err = file_get_translator_cntl(np->nn->port, &p); + if(err) + return err; + + /*set the parameters accordingly*/ + *cntltype = MACH_MSG_TYPE_MOVE_SEND; + *cntl = p; + + /*return the result of operations*/ + return err; + } + /*Lock the node*/ mutex_lock(&np->lock); |