1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-10-29 12:57:50 +00:00

removed perl generator, added c generator

This commit is contained in:
Andrew Karpow
2014-03-08 20:32:54 +01:00
parent 35ab38d0e2
commit b75dadf7a9
7 changed files with 111 additions and 68 deletions

View File

@@ -19,7 +19,6 @@
#include <string.h>
#include "http_server.h"
#include "http_files.h"
int callback_http(struct mg_connection *c)
{

View File

@@ -21,6 +21,14 @@
#include "mongoose.h"
struct embedded_file {
const char *name;
const unsigned char *data;
const char *mimetype;
size_t size;
};
const struct embedded_file *find_embedded_file(const char *name);
int callback_http(struct mg_connection *c);
#endif

View File

@@ -171,8 +171,7 @@ int callback_mpd(struct mg_connection *c)
"}", mpd.host, mpd.port, mpd.password ? "true" : "false");
break;
case MPD_API_SET_MPDPASS:
if(sscanf(c->content, "MPD_API_SET_MPDPASS,%m[^\t\n ]", &p_charbuf) &&
p_charbuf != NULL)
if(sscanf(c->content, "MPD_API_SET_MPDPASS,%m[^\t\n ]", &p_charbuf))
{
if(mpd.password)
free(mpd.password);

View File

@@ -84,7 +84,6 @@ int main(int argc, char **argv)
mg_set_option(server, "listening_port", optarg);
break;
case 'u':
printf("Strarg is %s\n", optarg);
mg_set_option(server, "run_as_user", optarg);
break;
case 'v':