]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
access: add missing aa_representative initialization, fixes #2865
authorJaroslav Kysela <perex@perex.cz>
Tue, 26 May 2015 07:27:40 +0000 (09:27 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 26 May 2015 15:50:05 +0000 (17:50 +0200)
Conflicts:
src/access.c

src/access.c
src/dvr/dvr_db.c

index c046f6d14bfcd5fc97de1f86e0ac67551e4e2d6c..dd499984f683b005e9b0580f94b016f1b0b76050 100644 (file)
@@ -617,8 +617,6 @@ access_get_hashed(const char *username, const uint8_t digest[20],
   return a;
 }
 
-
-
 /**
  *
  */
@@ -628,6 +626,9 @@ access_get_by_addr(struct sockaddr *src)
   access_t *a = calloc(1, sizeof(*a));
   access_entry_t *ae;
 
+  a->aa_representative = malloc(50);
+  tcp_get_ip_str(src, a->aa_representative, 50);
+
   if(access_noacl) {
     a->aa_rights = ACCESS_FULL;
     return a;
index e84b0d138b17cbc8e7c1ba8f57c844d3ce51ea5a..9bce456ed807be79daa60e55ba13b6d14c4fb0d7 100644 (file)
@@ -607,7 +607,7 @@ dvr_entry_create_(const char *config_uuid, epg_broadcast_t *e,
   tvhlog(LOG_INFO, "dvr", "entry %s \"%s\" on \"%s\" starting at %s, "
         "scheduled for recording by \"%s\"",
          idnode_uuid_as_str(&de->de_id),
-        lang_str_get(de->de_title, NULL), DVR_CH_NAME(de), tbuf, creator);
+        lang_str_get(de->de_title, NULL), DVR_CH_NAME(de), tbuf, creator ?: "");
 
   dvr_entry_save(de);
   return de;