aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/http.c10
-rw-r--r--plugins/irc.c4
-rw-r--r--plugins/lua-loader.c14
-rw-r--r--plugins/mpd.lua2
-rw-r--r--plugins/socks.lua4
-rw-r--r--plugins/ssh.c4
6 files changed, 19 insertions, 19 deletions
diff --git a/plugins/http.c b/plugins/http.c
index 2064e87..35e3d70 100644
--- a/plugins/http.c
+++ b/plugins/http.c
@@ -90,7 +90,7 @@ on_headers_complete (http_parser *parser)
struct scan_data *scan = parser->data;
// We've got this far, this must be an HTTP server
g_data.api->unit_set_success (scan->u, true);
- g_data.api->unit_abort (scan->u);
+ g_data.api->unit_stop (scan->u);
return 1;
}
@@ -144,12 +144,12 @@ on_data (void *handle, const void *data, size_t len)
if (parser->upgrade)
{
// We should never get here though because `on_headers_complete'
- // is called first and ends up aborting the unit.
+ // is called first and ends up stopping the unit.
g_data.api->unit_add_info (scan->u, "upgrades to a different protocol");
- g_data.api->unit_abort (scan->u);
+ g_data.api->unit_stop (scan->u);
}
else if (n_parsed != len && parser->http_errno != HPE_CB_headers_complete)
- g_data.api->unit_abort (scan->u);
+ g_data.api->unit_stop (scan->u);
}
static void
@@ -168,7 +168,7 @@ static struct service g_http_service =
.on_data = on_data,
.on_eof = on_eof,
.on_error = NULL,
- .on_aborted = NULL
+ .on_stopped = NULL
};
static bool
diff --git a/plugins/irc.c b/plugins/irc.c
index 03cd0df..156d4b5 100644
--- a/plugins/irc.c
+++ b/plugins/irc.c
@@ -107,7 +107,7 @@ on_irc_message (const struct irc_message *msg, const char *raw, void *user_data)
g_data.api->unit_add_info (scan->u, info);
free (info);
- g_data.api->unit_abort (scan->u);
+ g_data.api->unit_stop (scan->u);
}
}
}
@@ -130,7 +130,7 @@ static struct service g_irc_service =
.on_data = on_data,
.on_eof = NULL,
.on_error = NULL,
- .on_aborted = NULL
+ .on_stopped = NULL
};
static bool
diff --git a/plugins/lua-loader.c b/plugins/lua-loader.c
index 013b25f..95550da 100644
--- a/plugins/lua-loader.c
+++ b/plugins/lua-loader.c
@@ -110,10 +110,10 @@ xlua_unit_add_info (lua_State *L)
}
static int
-xlua_unit_abort (lua_State *L)
+xlua_unit_stop (lua_State *L)
{
struct unit_wrapper *data = luaL_checkudata (L, 1, UNIT_METATABLE);
- g_data.api->unit_abort (data->unit);
+ g_data.api->unit_stop (data->unit);
return 0;
}
@@ -133,7 +133,7 @@ static luaL_Reg xlua_unit_table[] =
{ "write", xlua_unit_write },
{ "set_success", xlua_unit_set_success },
{ "add_info", xlua_unit_add_info },
- { "abort", xlua_unit_abort },
+ { "stop", xlua_unit_stop },
{ "__gc", xlua_unit_destroy },
{ NULL, NULL }
};
@@ -208,7 +208,7 @@ handle_scan_method_failure (struct scan_data *data)
{
print_error ("Lua: service `%s': %s", data->service->name,
lua_tostring (data->L, -1));
- g_data.api->unit_abort (data->unit);
+ g_data.api->unit_stop (data->unit);
lua_pop (data->L, 1);
}
@@ -273,10 +273,10 @@ on_error (void *handle)
}
static void
-on_aborted (void *handle)
+on_stopped (void *handle)
{
struct scan_data *data = handle;
- if (!prepare_scan_method (data, "on_aborted"))
+ if (!prepare_scan_method (data, "on_stopped"))
return;
if (lua_pcall (data->L, 1, 0, 0))
handle_scan_method_failure (data);
@@ -329,7 +329,7 @@ xlua_register_service (lua_State *L)
s->on_data = on_data;
s->on_eof = on_eof;
s->on_error = on_error;
- s->on_aborted = on_aborted;
+ s->on_stopped = on_stopped;
g_data.api->register_service (g_data.ctx, s);
return 0;
diff --git a/plugins/mpd.lua b/plugins/mpd.lua
index b513723..4735e66 100644
--- a/plugins/mpd.lua
+++ b/plugins/mpd.lua
@@ -34,7 +34,7 @@ function MPD:on_data (data)
self.unit:add_info ("version " .. version)
self.unit:set_success (true)
end
- self.unit:abort ()
+ self.unit:stop ()
end
end
diff --git a/plugins/socks.lua b/plugins/socks.lua
index 364eb48..ed07eff 100644
--- a/plugins/socks.lua
+++ b/plugins/socks.lua
@@ -38,7 +38,7 @@ function Socks4:on_data (data)
if null == 0 and code >= 90 and code <= 93 then
self.unit:set_success (true)
end
- self.unit:abort ()
+ self.unit:stop ()
end
end
@@ -75,7 +75,7 @@ function Socks5:on_data (data)
end
self.unit:set_success (true)
end
- self.unit:abort ()
+ self.unit:stop ()
end
end
diff --git a/plugins/ssh.c b/plugins/ssh.c
index 9d233da..8ce2e08 100644
--- a/plugins/ssh.c
+++ b/plugins/ssh.c
@@ -77,7 +77,7 @@ on_data (void *handle, const void *data, size_t len)
g_data.api->unit_set_success (scan->u, true);
end_scan:
- g_data.api->unit_abort (scan->u);
+ g_data.api->unit_stop (scan->u);
}
static struct service g_ssh_service =
@@ -90,7 +90,7 @@ static struct service g_ssh_service =
.on_data = on_data,
.on_eof = NULL,
.on_error = NULL,
- .on_aborted = NULL
+ .on_stopped = NULL
};
static bool