memcpy(&nginx_buffer[nginx_buffer_len], buf, len);
nginx_buffer_len += len;
nginx_buffer[nginx_buffer_len] = 0;
memcpy(&nginx_buffer[nginx_buffer_len], buf, len);
nginx_buffer_len += len;
nginx_buffer[nginx_buffer_len] = 0;
}
static int config(const char *key, const char *value) {
if (strcasecmp(key, "url") == 0)
}
static int config(const char *key, const char *value) {
if (strcasecmp(key, "url") == 0)
curl_easy_setopt(curl, CURLOPT_PASSWORD, (pass == NULL) ? "" : pass);
#else
static char credentials[1024];
curl_easy_setopt(curl, CURLOPT_PASSWORD, (pass == NULL) ? "" : pass);
#else
static char credentials[1024];
- int status = ssnprintf(credentials, sizeof(credentials), "%s:%s", user,
- pass == NULL ? "" : pass);
+ int status = snprintf(credentials, sizeof(credentials), "%s:%s", user,
+ pass == NULL ? "" : pass);
if ((status < 0) || ((size_t)status >= sizeof(credentials))) {
ERROR("nginx plugin: Credentials would have been truncated.");
if ((status < 0) || ((size_t)status >= sizeof(credentials))) {
ERROR("nginx plugin: Credentials would have been truncated.");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 50L);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 50L);
if (curl_easy_perform(curl) != CURLE_OK) {
WARNING("nginx plugin: curl_easy_perform failed: %s", nginx_curl_error);
if (curl_easy_perform(curl) != CURLE_OK) {
WARNING("nginx plugin: curl_easy_perform failed: %s", nginx_curl_error);
plugin_register_init("nginx", init);
plugin_register_read("nginx", nginx_read);
} /* void module_register */
plugin_register_init("nginx", init);
plugin_register_read("nginx", nginx_read);
} /* void module_register */