Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
access: add missing aa_representative initialization, fixes #2865
  • Loading branch information
perexg committed May 26, 2015
1 parent feeea4b commit 38a5b84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/access.c
Expand Up @@ -622,6 +622,9 @@ access_get_by_username(const char *username)
access_t *a = calloc(1, sizeof(*a));
access_entry_t *ae;

a->aa_username = strdup(username);
a->aa_representative = strdup(username);

if(access_noacl) {
a->aa_rights = ACCESS_FULL;
return a;
Expand Down Expand Up @@ -650,6 +653,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_str_from_ip(src, a->aa_representative, 50);

if(access_noacl) {
a->aa_rights = ACCESS_FULL;
return a;
Expand Down
2 changes: 1 addition & 1 deletion src/dvr/dvr_db.c
Expand Up @@ -637,7 +637,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;
Expand Down

0 comments on commit 38a5b84

Please sign in to comment.