
# HG changeset patch # User Sharad Mishra <snmishra@us.ibm.com> # Date 1257536640 28800 # Node ID d52ebba7ae4c0a30078d67b79f68c91eaa5ae137 # Parent 9bcb945a1a3b61b2dceb99d84378ede5b3d6167b Added template RASD for IPv6 addresses. Signed-off-by: Sharad Mishra <snmishra@us.ibm.com> diff -r 9bcb945a1a3b -r d52ebba7ae4c src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Fri Nov 06 11:43:46 2009 -0800 +++ b/src/Virt_SettingsDefineCapabilities.c Fri Nov 06 11:44:00 2009 -0800 @@ -1523,6 +1523,7 @@ static CMPIStatus set_graphics_props(const CMPIObjectPath *ref, const char *id, const char *type, + const char *addr, struct inst_list *list) { CMPIInstance *inst; @@ -1533,8 +1534,6 @@ CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); if (STREQC(type, "vnc")) { - const char *addr = "127.0.0.1:-1"; - CMSetProperty(inst, "Address", (CMPIValue *)addr, CMPI_chars); CMSetProperty(inst, "KeyMap", (CMPIValue *)"en-us", CMPI_chars); @@ -1553,9 +1552,10 @@ { const char *id; CMPIStatus s = {CMPI_RC_OK, NULL}; - const char *type[] = {"vnc", "sdl"}; + const char *type[] = {"sdl", "vnc"}; + const char *addr[] = {NULL, "127.0.0.1:-1", "[::1]:-1"}; int type_ct = 2; - int i; + int i,j; switch(template_type) { case SDC_RASD_MIN: @@ -1578,9 +1578,18 @@ } for (i = 0; i < type_ct; i++) { - s = set_graphics_props(ref, id, type[i], list); - if (s.rc != CMPI_RC_OK) - goto out; + for (j = 1; j < 3; j++){ + s = set_graphics_props(ref, + id, + type[i], + addr[i*j], + list); + if (s.rc != CMPI_RC_OK) + goto out; + + if (i == 0) + break; + } } out: