File pacemaker-libcrmcommon-avoid-misuse-of-crm_get_msec.patch of Package pacemaker.19778

commit 82a674a5ab5c6e95e3b632c6bb862aeae964e9d3
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Wed Mar 7 13:26:51 2018 -0600

    Low: libcrmcommon: avoid misuse of crm_get_msec()
    
    Tested value was a bare number of milliseconds, which crm_get_msec() would
    treat as seconds. However, it was only tested > 0, so there was no problem --
    but fix it anyway.

Index: pacemaker-1.1.18+20180406.19c7be5c7/lib/common/operations.c
===================================================================
--- pacemaker-1.1.18+20180406.19c7be5c7.orig/lib/common/operations.c
+++ pacemaker-1.1.18+20180406.19c7be5c7/lib/common/operations.c
@@ -336,7 +336,7 @@ filter_action_parameters(xmlNode * param
         }
     }
 
-    if (crm_get_msec(interval) > 0 && compare_version(version, "1.0.8") > 0) {
+    if (interval && strcmp(interval, "0") && compare_version(version, "1.0.8") > 0) {
         /* Re-instate the operation's timeout value */
         if (timeout != NULL) {
             crm_xml_add(param_set, key, timeout);
openSUSE Build Service is sponsored by