Commit 9d84ba20 authored by Philipp Schafft's avatar Philipp Schafft 🦁
Browse files

Feature: Sending <admin> field to yp server

This sends the <admin> field to yp servers. It is thought be useful
to allow reaching the admins more easily in case of any yp problem.

Closes: #2146
parent 319b6d57
......@@ -389,6 +389,12 @@ static int do_yp_add (ypdata_t *yp, char *s, unsigned len)
int ret;
char *value;
ice_config_t *config;
char *admin;
config = config_get_config();
admin = util_url_escape(config->admin);
value = stats_get_value (yp->mount, "server_type");
add_yp_info (yp, value, YP_SERVER_TYPE);
......@@ -424,11 +430,14 @@ static int do_yp_add (ypdata_t *yp, char *s, unsigned len)
add_yp_info (yp, value, YP_AUDIO_INFO);
free (value);
ret = snprintf (s, len, "action=add&sn=%s&genre=%s&cpswd=%s&desc="
ret = snprintf (s, len, "action=add&admin=%s&sn=%s&genre=%s&cpswd=%s&desc="
yp->server_name, yp->server_genre, yp->cluster_password,
yp->server_desc, yp->url, yp->listen_url,
yp->server_type, yp->subtype, yp->bitrate, yp->audio_info);
if (ret >= (signed)len)
return ret+1;
ret = send_to_yp ("add", yp, s);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment