[IOT-2483, 2529] Incorrect IPv6 addr in endpoints
authorVeeraj Khokale <veeraj.sk@samsung.com>
Tue, 19 Sep 2017 05:59:14 +0000 (11:29 +0530)
committerUze Choi <uzchoi@samsung.com>
Fri, 29 Sep 2017 01:13:19 +0000 (01:13 +0000)
As per RFC 6874, the zone id of the ipv6 address
in a URI should be preceded by %25 and not just %.
Make this change while creating the ipv6 endpoint
payload.

Change-Id: I2e3ec53b16212d374c7ab2ecf6bfd5700c4e62ce
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
resource/csdk/stack/src/ocstack.c

index e795e8aa826f891a49411c4760941fe1edb92ac3..38d0fc30dda8146b7254d458e79e0c480eb204e9 100644 (file)
@@ -1475,7 +1475,7 @@ OCStackResult OCMapZoneIdToLinkLocalEndpoint(OCDiscoveryPayload *payload, uint32
                         {
                             assert(zoneId != NULL);
                             // put zoneId to end of addr
-                            OICStrcat(eps->addr, OC_MAX_ADDR_STR_SIZE, "%");
+                            OICStrcat(eps->addr, OC_MAX_ADDR_STR_SIZE, "%25");
                             OICStrcat(eps->addr, OC_MAX_ADDR_STR_SIZE, zoneId);
                             OICFree(zoneId);
                         }