Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
minor code clean-up in access_ticket_verify2()
  • Loading branch information
pgaubatz authored and perexg committed Nov 23, 2014
1 parent 3539dbf commit 25e4873
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/access.c
Expand Up @@ -153,11 +153,11 @@ access_ticket_verify2(const char *id, const char *resource)
if((at = access_ticket_find(id)) == NULL)
return NULL;

char at_resource_with_webroot[256];
strcat(at_resource_with_webroot, tvheadend_webroot ?: "");
strcat(at_resource_with_webroot, at->at_resource);
char buf[256];
strcpy(buf, tvheadend_webroot ?: "");
strcat(buf, at->at_resource);

if(strcmp(at->at_resource, resource) && strcmp(at_resource_with_webroot, resource))
if(strcmp(buf, resource))
return NULL;

return access_copy(at->at_access);
Expand Down

0 comments on commit 25e4873

Please sign in to comment.