From 59ca7a86d392e33b8aebbb19535317869766165a Mon Sep 17 00:00:00 2001 From: Parichay Kapoor Date: Fri, 12 Apr 2019 13:37:35 +0900 Subject: [PATCH] [IIO] Using case insensitive string comparison Using case insensitive string comparison for property decision Signed-off-by: Parichay Kapoor --- gst/nnstreamer/tensor_source/tensor_src_iio.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gst/nnstreamer/tensor_source/tensor_src_iio.c b/gst/nnstreamer/tensor_source/tensor_src_iio.c index c64adf4..c6ab58c 100644 --- a/gst/nnstreamer/tensor_source/tensor_src_iio.c +++ b/gst/nnstreamer/tensor_source/tensor_src_iio.c @@ -1072,9 +1072,11 @@ gst_tensor_src_iio_set_property (GObject * object, guint prop_id, case PROP_CHANNELS: { const gchar *param = g_value_get_string (value); - if (!g_strcmp0 (param, CHANNELS_ENABLED_ALL_CHAR)) { + if (!g_ascii_strncasecmp (param, CHANNELS_ENABLED_ALL_CHAR, + strlen (CHANNELS_ENABLED_ALL_CHAR))) { self->channels_enabled = CHANNELS_ENABLED_ALL; - } else if (!g_strcmp0 (param, CHANNELS_ENABLED_AUTO_CHAR)) { + } else if (!g_ascii_strncasecmp (param, CHANNELS_ENABLED_AUTO_CHAR, + strlen (CHANNELS_ENABLED_AUTO_CHAR))) { self->channels_enabled = CHANNELS_ENABLED_AUTO; } break; @@ -1723,7 +1725,7 @@ gst_tensor_src_iio_start (GstBaseSrc * src) self = GST_TENSOR_SRC_IIO_CAST (src); /** no support one shot mode for now */ - if (!g_strcmp0 (self->mode, MODE_ONE_SHOT)) { + if (!g_ascii_strncasecmp (self->mode, MODE_ONE_SHOT, strlen (MODE_ONE_SHOT))) { GST_ERROR_OBJECT (self, "One-shot mode not yet supported."); goto error_return; } -- 2.7.4