X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fgraph_list.c;h=d2416f4d4772c9fd07fd48b830a7bbb95b5cbed5;hb=593828eb6109b2f0ee43f090d64a252f0ff92774;hp=a33697f4c084b6b49ef5ef19b034fe871a8c5b95;hpb=6997bcaa3a362fd4c48a0909e0b88a4e1db5bf6a;p=collection4.git diff --git a/src/graph_list.c b/src/graph_list.c index a33697f..d2416f4 100644 --- a/src/graph_list.c +++ b/src/graph_list.c @@ -391,18 +391,25 @@ int gl_search (search_info_t *si, /* {{{ */ if ((si == NULL) || (callback == NULL)) return (EINVAL); - ident = search_to_ident (si); - if (ident == NULL) + if (search_has_selector (si)) { - fprintf (stderr, "gl_search: search_to_ident failed\n"); - return (-1); + ident = search_to_ident (si); + if (ident == NULL) + { + fprintf (stderr, "gl_search: search_to_ident failed\n"); + return (-1); + } + } + else + { + ident = NULL; } for (i = 0; i < gl_active_num; i++) { int status; - if (!graph_matches_ident (gl_active[i], ident)) + if ((ident != NULL) && !graph_ident_intersect (gl_active[i], ident)) continue; status = graph_search_inst (gl_active[i], si, @@ -416,7 +423,7 @@ int gl_search (search_info_t *si, /* {{{ */ { int status; - if (!graph_matches_ident (gl_dynamic[i], ident)) + if ((ident != NULL) && !graph_ident_intersect (gl_dynamic[i], ident)) continue; status = graph_search_inst (gl_dynamic[i], si,