mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
fixed some variable definitions to be ANSI compatable.
updated win32 project files with new files svn path=/trunk/icecast/; revision=5761
This commit is contained in:
parent
57dd5f71a5
commit
6dc92dae79
@ -24,6 +24,7 @@
|
||||
auth_result auth_check_client(source_t *source, client_t *client)
|
||||
{
|
||||
auth_t *authenticator = source->authenticator;
|
||||
auth_result result;
|
||||
|
||||
if(authenticator) {
|
||||
/* This will look something like "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" */
|
||||
@ -56,7 +57,7 @@ auth_result auth_check_client(source_t *source, client_t *client)
|
||||
username = userpass;
|
||||
password = tmp+1;
|
||||
|
||||
auth_result result = authenticator->authenticate(
|
||||
result = authenticator->authenticate(
|
||||
authenticator, username, password);
|
||||
|
||||
if(result == AUTH_OK)
|
||||
@ -118,12 +119,12 @@ static int get_line(FILE *file, char *buf, int len)
|
||||
static char *get_hash(char *data, int len)
|
||||
{
|
||||
struct MD5Context context;
|
||||
unsigned char digest[16];
|
||||
|
||||
MD5Init(&context);
|
||||
|
||||
MD5Update(&context, data, len);
|
||||
|
||||
unsigned char digest[16];
|
||||
MD5Final(digest, &context);
|
||||
|
||||
return util_bin_to_hex(digest, 16);
|
||||
@ -179,11 +180,12 @@ static auth_result htpasswd_auth(auth_t *auth, char *username, char *password)
|
||||
static auth_t *auth_get_htpasswd_auth(config_options_t *options)
|
||||
{
|
||||
auth_t *authenticator = calloc(1, sizeof(auth_t));
|
||||
htpasswd_auth_state *state;
|
||||
|
||||
authenticator->authenticate = htpasswd_auth;
|
||||
authenticator->free = htpasswd_clear;
|
||||
|
||||
htpasswd_auth_state *state = calloc(1, sizeof(htpasswd_auth_state));
|
||||
state = calloc(1, sizeof(htpasswd_auth_state));
|
||||
|
||||
while(options) {
|
||||
if(!strcmp(options->name, "filename"))
|
||||
|
@ -106,6 +106,7 @@ void config_clear(ice_config_t *c)
|
||||
mount_proxy *mount, *nextmount;
|
||||
aliases *alias, *nextalias;
|
||||
int i;
|
||||
config_options_t *option;
|
||||
|
||||
if (c->config_filename)
|
||||
free(c->config_filename);
|
||||
@ -172,7 +173,7 @@ void config_clear(ice_config_t *c)
|
||||
xmlFree(mount->fallback_mount);
|
||||
|
||||
xmlFree(mount->auth_type);
|
||||
config_options_t *option = mount->auth_options;
|
||||
option = mount->auth_options;
|
||||
while(option) {
|
||||
config_options_t *nextopt = option->next;
|
||||
xmlFree(option->name);
|
||||
@ -451,6 +452,8 @@ static void _parse_mount(xmlDocPtr doc, xmlNodePtr node,
|
||||
mount_proxy *mount = calloc(1, sizeof(mount_proxy));
|
||||
mount_proxy *current = configuration->mounts;
|
||||
mount_proxy *last=NULL;
|
||||
xmlNodePtr option;
|
||||
config_options_t *last_option;
|
||||
|
||||
while(current) {
|
||||
last = current;
|
||||
@ -506,8 +509,8 @@ static void _parse_mount(xmlDocPtr doc, xmlNodePtr node,
|
||||
}
|
||||
else if (strcmp(node->name, "authentication") == 0) {
|
||||
mount->auth_type = xmlGetProp(node, "type");
|
||||
xmlNodePtr option = node->xmlChildrenNode;
|
||||
config_options_t *last = NULL;
|
||||
option = node->xmlChildrenNode;
|
||||
last_option = NULL;
|
||||
while(option != NULL) {
|
||||
if(strcmp(option->name, "option") == 0) {
|
||||
config_options_t *opt = malloc(sizeof(config_options_t));
|
||||
@ -525,11 +528,11 @@ static void _parse_mount(xmlDocPtr doc, xmlNodePtr node,
|
||||
continue;
|
||||
}
|
||||
|
||||
if(last)
|
||||
last->next = opt;
|
||||
if(last_option)
|
||||
last_option->next = opt;
|
||||
else
|
||||
mount->auth_options = opt;
|
||||
last = opt;
|
||||
last_option = opt;
|
||||
}
|
||||
option = option->next;
|
||||
}
|
||||
|
@ -13,19 +13,19 @@ Class2=CIcecast2winDlg
|
||||
Class3=CAboutDlg
|
||||
|
||||
ResourceCount=10
|
||||
Resource1=IDD_CONFIGDIALOG
|
||||
Resource1=IDD_SSTATUS
|
||||
Resource2=IDR_MAINFRAME
|
||||
Resource3=IDD_ICECAST2WIN_DIALOG
|
||||
Resource4=IDR_MENU3
|
||||
Resource3=IDD_ABOUTBOX
|
||||
Resource4=IDR_MENU2
|
||||
Class4=CStatus
|
||||
Resource5=IDD_STATSDIALOG
|
||||
Resource5=IDR_TRAY
|
||||
Class5=CConfigTab
|
||||
Class6=CStatsTab
|
||||
Resource6=IDR_MENU2
|
||||
Resource7=IDD_SSTATUS
|
||||
Resource8=IDD_ABOUTBOX
|
||||
Resource9=IDR_TRAY
|
||||
Resource10=IDR_MENU4
|
||||
Resource6=IDR_MENU4
|
||||
Resource7=IDD_ICECAST2WIN_DIALOG
|
||||
Resource8=IDD_CONFIGDIALOG
|
||||
Resource9=IDR_MENU3
|
||||
Resource10=IDD_STATSDIALOG
|
||||
|
||||
[CLS:CIcecast2winApp]
|
||||
Type=0
|
||||
|
@ -93,6 +93,14 @@ SOURCE=..\src\admin.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\auth.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\auth.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\avl\avl.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -213,6 +221,14 @@ SOURCE=..\src\main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\md5.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\md5.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\os.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
Loading…
x
Reference in New Issue
Block a user