unsigned long countpendingscan=0;
-void queuescan(unsigned int IP, short scantype, unsigned short port, char class, time_t when) {
+void queuescan(patricia_node_t *node, short scantype, unsigned short port, char class, time_t when) {
pendingscan *psp, *psp2;
/* check if the IP/port combo is already queued - don't queue up
psp = ps_prioqueue;
while (psp != NULL)
{
- if (psp->IP == IP && psp->type == scantype &&
+ if (psp->node == node && psp->type == scantype &&
psp->port == port && psp->class == class)
{
/* found it, ignore */
psp = ps_normalqueue;
while (psp != NULL)
{
- if (psp->IP == IP && psp->type == scantype &&
+ if (psp->node == node && psp->type == scantype &&
psp->port == port && psp->class == class)
{
/* found it, ignore */
/* If there are scans spare, just start it immediately..
* provided we're not supposed to wait */
if (activescans < maxscans && when<=time(NULL) && (ps_start_ts+120 <= time(NULL))) {
- startscan(IP, scantype, port, class);
+ startscan(node, scantype, port, class);
return;
}
countpendingscan++;
- psp->IP=IP;
+ psp->node=node;
psp->type=scantype;
psp->port=port;
psp->class=class;
}
if (psp) {
- startscan(psp->IP, psp->type, psp->port, psp->class);
+ startscan(psp->node, psp->type, psp->port, psp->class);
free(psp);
countpendingscan--;
psp=NULL;