Skip to content

Commit

Permalink
Fix feature node access mode retrieval.
Browse files Browse the repository at this point in the history
Previously  the result was casted to a boolean, always returning
ARV_GC_ACCESS_MODE_RO or ARV_GC_ACCESS_MODE_WO.
Now it returns the correct enum.
  • Loading branch information
feuerste committed Nov 21, 2023
1 parent 6920958 commit 3fd6b0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/arvdevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ arv_device_get_feature_access_mode (ArvDevice *device, const char *feature)
g_return_val_if_fail (feature != NULL, ARV_GC_ACCESS_MODE_UNDEFINED);

node = arv_device_get_feature (device, feature);
return ARV_IS_GC_FEATURE_NODE (node) && arv_gc_feature_node_get_actual_access_mode (ARV_GC_FEATURE_NODE (node));
g_return_val_if_fail (ARV_IS_GC_FEATURE_NODE (node), ARV_GC_ACCESS_MODE_UNDEFINED);
return arv_gc_feature_node_get_actual_access_mode (ARV_GC_FEATURE_NODE (node));
}

/**
Expand Down

0 comments on commit 3fd6b0a

Please sign in to comment.