Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
profile: another fix for profile_find_by_list
  • Loading branch information
perexg committed Jun 14, 2015
1 parent f0cb852 commit ade6638
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/profile.c
Expand Up @@ -428,6 +428,8 @@ profile_verify(profile_t *pro, int sflags)
return 0;
if ((sflags & SUBSCRIPTION_HTSP) != 0 && !pro->pro_work)
return 0;
if ((sflags & SUBSCRIPTION_HTSP) == 0 && !pro->pro_open)
return 0;
sflags &= pro->pro_sflags;
sflags &= SUBSCRIPTION_PACKET|SUBSCRIPTION_MPEGTS;
return sflags ? 1 : 0;
Expand All @@ -447,6 +449,7 @@ profile_find_by_list
pro = profile_find_by_uuid(name);
if (!pro)
pro = profile_find_by_name(name, alt);
if (!profile_verify(pro, sflags))
pro = NULL;
if (uuids) {
uuid = pro ? idnode_uuid_as_str(&pro->pro_id) : "";
Expand All @@ -464,7 +467,7 @@ profile_find_by_list
res = pro;
}
if (!res)
res = profile_find_by_name(!strcmp(alt, "htsp") ? "htsp" : NULL, NULL);
res = profile_find_by_name((sflags & SUBSCRIPTION_HTSP) ? "htsp" : NULL, NULL);
return res;
}

Expand Down

0 comments on commit ade6638

Please sign in to comment.