~ubuntu-branches/ubuntu/utopic/pacemaker/utopic-proposed

« back to all changes in this revision

Viewing changes to tools/crm_mon.c

  • Committer: Package Import Robot
  • Author(s): Liam Young
  • Date: 2014-08-01 15:27:42 UTC
  • mfrom: (2.1.25 sid)
  • Revision ID: package-import@ubuntu.com-20140801152742-7crx0jtcwz4k2l45
Tags: 1.1.10+git20130802-4ubuntu1
* Merge from Debian unstable (LP: #1351307).  Remaining changes:
  - debian/control: Build-Depends on libcfg-dev; Depends on libheartbeat2.
* Corosync's pacemaker plugin is disabled, hence not built:
  - debian/licrmcluster4-dev.install: Do not install plugin.h.
  - debian/pacemaker.install: Do not install pacemaker.lcrso.

Show diffs side-by-side

added added

removed removed

Lines of Context:
973
973
        if (safe_str_eq(type, "ping") || safe_str_eq(type, "pingd")) {
974
974
            const char *name = "pingd";
975
975
            const char *multiplier = NULL;
976
 
            char **host_list = NULL;
977
976
            int host_list_num = 0;
978
977
            int expected_score = 0;
979
978
 
984
983
            /* To identify the resource with the attribute name. */
985
984
            if (safe_str_eq(name, attrname)) {
986
985
                int value = crm_parse_int(attrvalue, "0");
 
986
                const char *hosts = g_hash_table_lookup(rsc->parameters, "host_list");
987
987
 
988
988
                multiplier = g_hash_table_lookup(rsc->parameters, "multiplier");
989
 
                host_list = g_strsplit(g_hash_table_lookup(rsc->parameters, "host_list"), " ", 0);
990
 
                host_list_num = g_strv_length(host_list);
991
 
                g_strfreev(host_list);
 
989
                if(hosts) {
 
990
                    char **host_list = g_strsplit(hosts, " ", 0);
 
991
                    host_list_num = g_strv_length(host_list);
 
992
                    g_strfreev(host_list);
 
993
                }
 
994
 
992
995
                /* pingd multiplier is the same as the default value. */
993
996
                expected_score = host_list_num * crm_parse_int(multiplier, "1");
994
997