From: David van Moolenbroek Date: Fri, 7 Jan 2011 17:06:24 +0000 (+0000) Subject: DS: update subscriptions for deleted keys upon process exit X-Git-Tag: v3.2.0~707 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/host.html?a=commitdiff_plain;h=dbcca28c1971edc11adcc3967273163a6a7c9908;p=minix.git DS: update subscriptions for deleted keys upon process exit --- diff --git a/servers/ds/store.c b/servers/ds/store.c index 4ee08693e..fd4c27521 100644 --- a/servers/ds/store.c +++ b/servers/ds/store.c @@ -120,7 +120,7 @@ PRIVATE endpoint_t ds_getprocep(const char *s) if((dsp = lookup_entry(s, DSF_TYPE_LABEL)) != NULL) return dsp->u.u32; - return (endpoint_t) -1; + panic("ds_getprocep: process endpoint not found"); } /*===========================================================================* @@ -629,9 +629,6 @@ PUBLIC int do_check(message *m_ptr) /* Copy the type and the owner of the original entry. */ entry_owner_e = ds_getprocep(ds_store[i].owner); - if(entry_owner_e == -1) { - panic("ds_getprocep failed"); - } m_ptr->DS_FLAGS = ds_store[i].flags & DSF_MASK_TYPE; m_ptr->DS_OWNER = entry_owner_e; @@ -688,6 +685,8 @@ PUBLIC int do_delete(message *m_ptr) for (i = 0; i < NR_DS_KEYS; i++) { if ((ds_store[i].flags & DSF_IN_USE) && !strcmp(ds_store[i].owner, label)) { + update_subscribers(&ds_store[i], 0); + ds_store[i].flags = 0; } }