- assoc->init->peer_name =
- odr_strdup(assoc->encode, cs_addrstr(assoc->client_link));
+
+ assoc->init->peer_name = (char *)
+ odr_malloc(assoc->encode,
+ (peer_name1 ? strlen(peer_name1) : 0)
+ + 4 + strlen(peer_name2));
+ strcpy(assoc->init->peer_name, "");
+ if (peer_name1)
+ {
+ strcat(assoc->init->peer_name, peer_name1);
+ strcat(assoc->init->peer_name, ", ");
+ }
+ strcat(assoc->init->peer_name, peer_name2);