silc_free(mapconn->city);
silc_free(mapconn->admin);
silc_free(mapconn->description);
- silc_free(mapconn->writemaphtml_url);
+ silc_free(mapconn->html_url);
silc_free(mapconn->up_color);
silc_free(mapconn->up_text_color);
silc_free(mapconn->down_color);
# Example : writemaphtml { filename = "htmlmap.map"; image = "map.jpg"; };
# Description : Write the gathered information as as HTML map page. This
# allows the user to click the specified points of URLs.
-# The writemaphtml_url parameter in server will specify the
+# The html_url parameter in server will specify the
# URL that will be used in the HTML map. If omitted the
# filename created by writehml command is used. The <cut_lat>
# and <cut_lon> are specified if the <image> is a portion of
connect = false;
connect_timeout = "30";
+ # URL used in writemaphtml and writehtml, instead of hostname
+ #html_url = "";
+
# Statistics to fetch
starttime = true;
uptime = true;
char *admin;
char *description;
int connect_timeout;
- char *writemaphtml_url;
+ char *html_url;
/* Flags */
unsigned int connect : 1;
{ "city", SILC_CONFIG_ARG_STR, silc_map_cmd_server, NULL },
{ "admin", SILC_CONFIG_ARG_STR, silc_map_cmd_server, NULL },
{ "description", SILC_CONFIG_ARG_STRE, silc_map_cmd_server, NULL },
- { "writemaphtml_url", SILC_CONFIG_ARG_STRE, silc_map_cmd_server, NULL },
+ { "html_url", SILC_CONFIG_ARG_STRE, silc_map_cmd_server, NULL },
/* Connect params */
{ "connect", SILC_CONFIG_ARG_TOGGLE, silc_map_cmd_server, NULL },
curr_conn->admin = strdup((char *)val);
} else if (!strcmp(name, "description")) {
curr_conn->description = strdup((char *)val);
- } else if (!strcmp(name, "writemaphtml_url")) {
- curr_conn->writemaphtml_url = strdup((char *)val);
+ } else if (!strcmp(name, "html_url")) {
+ curr_conn->html_url = strdup((char *)val);
} else if (!strcmp(name, "connect")) {
curr_conn->connect = (bool)*(int *)val;
} else if (!strcmp(name, "connect_timeout")) {
"<td align = \"center\" class=\"%s\"> %d</td>\n"
"<td align = \"center\" class=\"%s\"> %s</td>\n"
"<td align = \"center\" class=\"%s\"> %s</td>\n"
- "</tr>\n", class, hostname, mapconn->port,
+ "</tr>\n", class,
+ mapconn->html_url ? mapconn->html_url : hostname, mapconn->port,
hostname, class, ip, class, mapconn->port, class,
mapconn->country, class, mapconn->admin);
}
silc_dlist_start(map->conns);
while ((mapconn = silc_dlist_get(map->conns)) != SILC_LIST_END) {
- if (mapconn->writemaphtml_url && mapconn->writemaphtml_url[0]) {
- silc_strncat(url, sizeof(url), mapconn->writemaphtml_url,
- strlen(mapconn->writemaphtml_url));
+ if (mapconn->html_url && mapconn->html_url[0]) {
+ silc_strncat(url, sizeof(url), mapconn->html_url,
+ strlen(mapconn->html_url));
} else {
silc_dlist_start(mapconn->hostnames);
hostname = silc_dlist_get(mapconn->hostnames);