From: Jaroslav Kysela Date: Thu, 21 May 2015 19:54:09 +0000 (+0200) Subject: htsp: initialize creator for network accounts without usernames (IP addresses) for... X-Git-Tag: v4.2.1~2500 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86ef485f6329a5a00dfef5ff8772f2c71f0dfe0d;p=thirdparty%2Ftvheadend.git htsp: initialize creator for network accounts without usernames (IP addresses) for autorec/timerec, too --- diff --git a/src/htsp_server.c b/src/htsp_server.c index 77fa2e43c..ace04f343 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -1697,6 +1697,8 @@ htsp_method_addAutorecEntry(htsp_connection_t *htsp, htsmsg_t *in) if(htsmsg_get_s64(in, "stopExtra", &stop_extra)) stop_extra = 0; // 0 = dvr config creator = htsp->htsp_username; + if (creator == NULL || *creator == '\0') + creator = htsp->htsp_granted_access->aa_representative; if (!(comment = htsmsg_get_str(in, "comment"))) comment = ""; if (!(name = htsmsg_get_str(in, "name"))) @@ -1796,6 +1798,8 @@ htsp_method_addTimerecEntry(htsp_connection_t *htsp, htsmsg_t *in) enabled = 1; creator = htsp->htsp_username; + if (creator == NULL || *creator == '\0') + creator = htsp->htsp_granted_access->aa_representative; if (!(comment = htsmsg_get_str(in, "comment"))) comment = ""; if (!(name = htsmsg_get_str(in, "name")))