-
Notifications
You must be signed in to change notification settings - Fork 150
Fix/libiiov1 segfault #535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
iio_create_context() now returns an error pointer instead of NULL when a context is not properly created. This was later leading to a segmentation fault. Signed-off-by: Nuno Sá <[email protected]>
libini2.c
Outdated
|
||
/*for (i = 0; i < iio_device_get_channels_count(dev); i++) | ||
iio_channel_attr_read_all(iio_device_get_channel(dev, i), | ||
save_to_ini_chn_cb, ¶ms); | ||
iio_device_attr_read_all(dev, save_to_ini_dev_cb, ¶ms); | ||
|
||
params.is_debug = true; | ||
iio_device_debug_attr_read_all(dev, save_to_ini_dev_cb, ¶ms);*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cristina-suteu you disabled this code in this commit (1a67750). Is it not required at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yes... it might be that I just blindly removed stuff without giving it a thought if it needs rewriting...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, and I just see that likely all of the unused stuff is because of that commented code.... If it needs a rewrite, I can drop this commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's best to drop the commit now. Keep it local or on a separate branch in case it turns out it is needed.
Get rid of an unused variable... Signed-off-by: Nuno Sá <[email protected]>
e1a8300
to
bc83e35
Compare
v2:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
PR Description
Main patch is to fix a segfault when we fail to properly IIO context. Rest is just removal of dead unused code...
PR Type
PR Checklist