A fresh `master_device' port is now obtained when accessing the device
file, not only on translator startup.  This ensures that the device
can be re-opened after netdde has died.
---
 devnode/devnode.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/devnode/devnode.c b/devnode/devnode.c
index 50011aa..d9d863e 100644
--- a/devnode/devnode.c
+++ b/devnode/devnode.c
@@ -164,6 +164,10 @@ ds_device_open (mach_port_t master_port, mach_port_t 
reply_port,
       || device_name == NULL) 
       return D_NO_SUCH_DEVICE;
 
+  master_device = file_name_lookup (master_file, 0, 0);
+  if (master_device == MACH_PORT_NULL)
+    error (1, errno, "file_name_lookup");
+
   err = device_open (master_device, mode, device_name, device); 
   *devicetype = MACH_MSG_TYPE_MOVE_SEND;
   return err;
-- 
1.8.3.1



Reply via email to