From: Lidong Zhong Date: Tue, 07 Jul 2015 21:30:49 -0600 Subject: [PATCH] dmeventd: fix dso name wrong compare In-Reply-To: <1435310166-2418-1-git-send-email-lzhong@suse.com> References: <1435310166-2418-1-git-send-email-lzhong@suse.com> Message-ID: <559D09E9020000E100013790@relay2.provo.novell.com> List-Id: To: lvm-devel@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi list, dmevent_tool won't work without this patch. Could somebody help to review this patch? Thanks, Lidong >>> On 6/26/2015 at 05:16 PM, in message <1435310166-2418-1-git-send-email-lzhong@suse.com>, Lidong Zhong wrote: > 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. */