]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
htsp: initialize creator for network accounts without usernames (IP addresses) for...
authorJaroslav Kysela <perex@perex.cz>
Thu, 21 May 2015 19:54:09 +0000 (21:54 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 21 May 2015 19:54:09 +0000 (21:54 +0200)
src/htsp_server.c

index 77fa2e43c38727ce48545c15c8fe95e5710d2b19..ace04f34335abf3ea73089805335cff4f3987de1 100644 (file)
@@ -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")))