From 5184399673cc3554c0331b6fe862dcf45859fc22 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 12 Jul 2012 22:41:50 +0200 Subject: [PATCH] URL-Handling: bugfixes - add flag for relayisng - when *Url is a valid pointer, preserve it to (*URL)->Next --- libcitadel/lib/libcitadel.h | 1 + libcitadel/lib/urlhandling.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libcitadel/lib/libcitadel.h b/libcitadel/lib/libcitadel.h index a4e8f0cf0..a110baf25 100644 --- a/libcitadel/lib/libcitadel.h +++ b/libcitadel/lib/libcitadel.h @@ -391,6 +391,7 @@ struct ParsedURL { struct hostent *HEnt; struct sockaddr_in6 Addr; ParsedURL *Next; + int IsRelay; }; void FreeURL(ParsedURL** Url); diff --git a/libcitadel/lib/urlhandling.c b/libcitadel/lib/urlhandling.c index 49878afda..f350ea7d4 100644 --- a/libcitadel/lib/urlhandling.c +++ b/libcitadel/lib/urlhandling.c @@ -130,7 +130,9 @@ int ParseURL(ParsedURL **Url, StrBuf *UrlStr, unsigned short DefaultPort) ((struct sockaddr_in *)&(url->Addr))->sin_port = htons(url->Port); ((struct sockaddr_in *)&(url->Addr))->sin_family = AF_INET; } - } + } + if (*Url != NULL) + url->Next = *Url; *Url = url; return 1; } -- 2.30.2