[lvm-devel] [PATCH] dmeventd: fix dso name wrong compare
Lidong Zhong
lzhong at suse.com
Fri Jun 26 09:16:06 UTC 2015
If the dso name is not set in client, then it will be replaced by "-".
So the server should compare the dso name with "-" to decide whether
it is set.
---
daemons/dmeventd/dmeventd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c
index fcfa423..d81c4ee 100644
--- a/daemons/dmeventd/dmeventd.c
+++ b/daemons/dmeventd/dmeventd.c
@@ -1190,12 +1190,12 @@ static int _want_registered_device(char *dso_name, char *device_uuid,
struct thread_status *thread)
{
/* If DSO names and device paths are equal. */
- if (dso_name && device_uuid)
+ if (strcmp(dso_name,"-") && device_uuid)
return !strcmp(dso_name, thread->dso_data->dso_name) &&
!strcmp(device_uuid, thread->device.uuid);
/* If DSO names are equal. */
- if (dso_name)
+ if (strcmp(dso_name, "-"))
return !strcmp(dso_name, thread->dso_data->dso_name);
/* If device paths are equal. */
--
1.8.1.4
More information about the lvm-devel
mailing list