- if ( allattrs ) {
- /* user requested all user attributes */
- /* if operational, make sure it's in list */
-
- if( oc_check_operational_attr( a->a_type )
- && !charray_inlist( attrs, a->a_type ) )
+ if ( oc_check_operational_attr( a->a_type ) ) {
+ if( !opattrs && !charray_inlist( attrs, a->a_type ) )
+ {
+ continue;
+ }
+ } else {
+ if (!userattrs && !charray_inlist( attrs, a->a_type ) )