summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64652a2)
raw | patch | inline | side by side (parent: 64652a2)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 20 Apr 2009 18:12:53 +0000 (20:12 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 20 Apr 2009 18:12:53 +0000 (20:12 +0200) |
src/apache.c | patch | blob | history |
diff --git a/src/apache.c b/src/apache.c
index 9cec8fd3149876428882dbcd8e1c919e21867863..46622721573a9409c04aa52aa9d9c483a99cddbb 100644 (file)
--- a/src/apache.c
+++ b/src/apache.c
break;
}
+ /* Check if struct is complete.. */
+ if ((status == 0) && (st->url == NULL))
+ {
+ ERROR ("apache plugin: Instance `%s': "
+ "No URL has been configured.",
+ st->name);
+ status = -1;
+ }
+
if (status == 0)
{
user_data_t ud;
{
static char credentials[1024];
- if (st->url == NULL)
- {
- WARNING ("apache plugin: init_host: No URL configured, returning "
- "an error.");
- return (-1);
- }
+ assert (st->url != NULL);
+ /* (Assured by `config_add') */
if (st->curl != NULL)
{
curl_easy_cleanup (st->curl);
+ st->curl = NULL;
}
if ((st->curl = curl_easy_init ()) == NULL)
st = user_data->data;
+ assert (st->url != NULL);
+ /* (Assured by `config_add') */
+
if (st->curl == NULL)
{
int status;
}
assert (st->curl != NULL);
- if (st->url == NULL)
- return (-1);
-
st->apache_buffer_fill = 0;
if (curl_easy_perform (st->curl) != 0)
{