mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-11-03 04:17:17 -05:00
7402383448
This cleans the libcurl usage up a bit. It moves common code used to interact with libcurl into a single new file curl.[ch]. Notes: * It does not alter any features nor fixes any bugs. * Thew REVIEW about strdup(self->url) in event_url.c as been processed. According to the manpage for curl_easy_setopt()/CURLOPT_URL there is no need for us to copy. * URL Auth as well as URL triggers have sent ICECAST_VERSION_STRING as User-Agent:, this has be corrected to what is set in the config file. * As curl.c is now a single point for setting parameters all the TLS parameters should be reviewed and set (based on config). Please test!
27 lines
702 B
C
27 lines
702 B
C
/* Icecast
|
|
*
|
|
* This program is distributed under the GNU General Public License, version 2.
|
|
* A copy of this license is included with this source.
|
|
*
|
|
* Copyright 2015, Philipp "ph3-der-loewe" Schafft <lion@lion.leolix.org>,
|
|
*/
|
|
|
|
#ifndef __CURL_H__
|
|
#define __CURL_H__
|
|
|
|
#include <curl/curl.h>
|
|
|
|
/* initialize/shutdown libcurl.
|
|
* Those two functions are fully thread unsafe
|
|
* and must only be run by the main thread and
|
|
* only when no other thread is running.
|
|
*/
|
|
int icecast_curl_initialize(void);
|
|
int icecast_curl_shutdown(void);
|
|
|
|
/* creator and destructor function for CURL* object. */
|
|
CURL *icecast_curl_new(const char *url, char * errors);
|
|
int icecast_curl_free(CURL *curl);
|
|
|
|
#endif
|