~ubuntu-branches/ubuntu/karmic/openvas-server/karmic

« back to all changes in this revision

Viewing changes to openvasd/pluginscheduler.c

  • Committer: Bazaar Package Importer
  • Author(s): Javier Fernandez-Sanguino Pen~a
  • Date: 2009-01-02 01:38:47 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090102013847-74xy2uo1e3hovqjo
Tags: 2.0.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* OpenVAS
2
 
* $Id: pluginscheduler.c 1205 2008-08-22 12:57:33Z mwiegand $
 
2
* $Id: pluginscheduler.c 1707 2008-11-12 14:30:20Z mwiegand $
3
3
* Description: Tells openvasd which plugin should be executed next.
4
4
*
5
5
* Authors: - Renaud Deraison <deraison@nessus.org> (Original pre-fork develoment)
29
29
 
30
30
 
31
31
#include <includes.h>
 
32
 
 
33
#include <glib.h>
 
34
 
32
35
#define IN_SCHEDULER_CODE 1
33
36
#include "pluginscheduler.h"
34
37
#include "pluginload.h"
738
741
    {
739
742
     struct scheduler_plugin * p = plugin_next_unrun_dependencie(h, deps_ptr, 0);
740
743
     
741
 
     switch((int)p)
 
744
     switch(GPOINTER_TO_SIZE(p))
742
745
     {
743
 
      case (int)NULL :
 
746
      case GPOINTER_TO_SIZE(NULL) :
744
747
        scheduler_mark_running_ports(h, l->plugin);
745
748
        plugin_set_running_state(h, l->plugin, PLUGIN_STATUS_RUNNING);
746
749
        return l->plugin;
747
750
 
748
751
         break;
749
 
     case (int)PLUG_RUNNING:
 
752
     case GPOINTER_TO_SIZE(PLUG_RUNNING) :
750
753
        {
751
754
        /* One of the dependencie is still running  -  we write down its category */
752
755
        if(l->plugin->category < running_category)