th.maxchan = devc->maxchan;
if(DEVNULL_HAS_PRIV(devc, MAXSENDQ) && (!DEVNULL_HAS_PRIV(&th, MAXSENDQ) || th.maxsendq < devc->maxsendq))
th.maxsendq = devc->maxsendq;
- th.modes |= devc->maxsendq;
+ th.modes |= devc->modes;
if(!th.name)
th.name = devc->name;
}
struct devnull_class th;
memset(&th, 0, sizeof(th));
+ if(devnull_check_priv_func) {
+ struct devnull_class ext_class = ((struct devnull_class (*)(struct handle_info *))devnull_check_priv_func)(hi);
+ th.modes |= ext_class.modes;
+ if(ext_class.name)
+ th.name = ext_class.name;
+ if(DEVNULL_HAS_PRIV(&th, CHANLIMIT))
+ th.maxchan = ext_class.maxchan;
+ if(DEVNULL_HAS_PRIV(&th, MAXSENDQ))
+ th.maxsendq = ext_class.maxsendq;
+ }
+
if(hi->devnull_id) {
struct devnull_class *thp;
if((thp = devnull_find_id(hi->devnull_id))) {