mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-06-30 22:18:19 -04:00
Update: Converted ping_simple() to take a string_renderer_t* as data
This commit is contained in:
parent
cecc3e1ace
commit
cd25ca90e2
@ -79,7 +79,7 @@ static int event_url_emit(void *state, event_t *event) {
|
||||
|
||||
string_renderer_end_list(renderer);
|
||||
|
||||
ping_simple(self->url, self->username, self->password, string_renderer_to_string_zero_copy(renderer));
|
||||
ping_simple(self->url, self->username, self->password, renderer);
|
||||
|
||||
igloo_ro_unref(&renderer);
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "thread/thread.h"
|
||||
|
||||
#include "ping.h"
|
||||
#include "string_renderer.h"
|
||||
#include "logging.h"
|
||||
#include "curl.h"
|
||||
|
||||
@ -108,7 +109,7 @@ static void ping_add_to_queue(ping_queue_t *entry)
|
||||
thread_cond_broadcast(&ping_cond);
|
||||
}
|
||||
|
||||
void ping_simple(const char *url, const char *username, const char *password, const char *data)
|
||||
void ping_simple(const char *url, const char *username, const char *password, string_renderer_t *data)
|
||||
{
|
||||
ping_queue_t *entry = calloc(1, sizeof(*entry));
|
||||
|
||||
@ -129,7 +130,7 @@ void ping_simple(const char *url, const char *username, const char *password, co
|
||||
}
|
||||
|
||||
if (data)
|
||||
curl_easy_setopt(entry->curl, CURLOPT_COPYPOSTFIELDS, data);
|
||||
curl_easy_setopt(entry->curl, CURLOPT_COPYPOSTFIELDS, string_renderer_to_string_zero_copy(data));
|
||||
|
||||
ping_add_to_queue(entry);
|
||||
}
|
||||
|
@ -9,9 +9,11 @@
|
||||
#ifndef __PING_H__
|
||||
#define __PING_H__
|
||||
|
||||
#include "icecasttypes.h"
|
||||
|
||||
void ping_initialize(void);
|
||||
void ping_shutdown(void);
|
||||
|
||||
void ping_simple(const char *url, const char *username, const char *password, const char *data);
|
||||
void ping_simple(const char *url, const char *username, const char *password, string_renderer_t *data);
|
||||
|
||||
#endif /* __PING_H__ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user