Logo Search packages:      
Sourcecode: dahdi-tools version File versions  Download package

static void process_prev_failed_deps ( char *  buf ) [static]

Process a previously failed dependency.

If a module was previously disabled because of a failed dependency or a conflict, and not because the user selected it to be that way, then it needs to be re-enabled by default if the problem is no longer present.

Definition at line 963 of file menuselect.c.

References categories, member::conflictsfailed, member::depsfailed, member::enabled, member::name, category::name, and member::was_defaulted.

Referenced by parse_existing_config().

{
      const char *cat_name, *mem_name;
      struct category *cat;
      struct member *mem;

      cat_name = strsep(&buf, "=");
      mem_name = strsep(&buf, "\n");

      if (!cat_name || !mem_name)
            return;

      AST_LIST_TRAVERSE(&categories, cat, list) {
            if (strcasecmp(cat->name, cat_name))
                  continue;
            AST_LIST_TRAVERSE(&cat->members, mem, list) {
                  if (strcasecmp(mem->name, mem_name))
                        continue;

                  if (!mem->depsfailed && !mem->conflictsfailed) {
                        mem->enabled = 1;             
                        print_debug("Just set %s enabled to %d in processing of previously failed deps\n", mem->name, mem->enabled);
                        mem->was_defaulted = 0;
                  }
      
                  break;
            }
            break;      
      }

      if (!cat || !mem)
            fprintf(stderr, "Unable to find '%s' in category '%s'\n", mem_name, cat_name);
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index