Switch to unified view

a/src/httpgate.cpp b/src/httpgate.cpp
...
...
28
#include <microhttpd.h>
28
#include <microhttpd.h>
29
29
30
#include "log.h"
30
#include "log.h"
31
#include "rcvqueue.h"
31
#include "rcvqueue.h"
32
#include "wav.h"
32
#include "wav.h"
33
#include "conftree.h"
33
34
34
using namespace std;
35
using namespace std;
35
36
36
/** 
37
/** 
37
   Implement web server to export the audio stream. I had to jump
38
   Implement web server to export the audio stream. I had to jump
...
...
293
static void *audioEater(void *cls)
294
static void *audioEater(void *cls)
294
{
295
{
295
    LOGDEB("audioEater: http\n");
296
    LOGDEB("audioEater: http\n");
296
    AudioEater::Context *ctxt = (AudioEater::Context*)cls;
297
    AudioEater::Context *ctxt = (AudioEater::Context*)cls;
297
298
299
    int port = 8768;
300
    string value;
301
    if (ctxt->config->get("schttpport", value)) {
302
        port = atoi(value.c_str());
303
    }
304
298
    LOGDEB("audioEater: queue " << ctxt->queue << " HTTP port " << ctxt->port 
305
    LOGDEB("audioEater: queue " << ctxt->queue << " HTTP port " << port 
299
           << endl);
306
           << endl);
300
307
301
    struct MHD_Daemon *daemon = 
308
    struct MHD_Daemon *daemon = 
302
        MHD_start_daemon(
309
        MHD_start_daemon(
303
            MHD_USE_THREAD_PER_CONNECTION,
310
            MHD_USE_THREAD_PER_CONNECTION,
304
            //MHD_USE_SELECT_INTERNALLY, 
311
            //MHD_USE_SELECT_INTERNALLY, 
305
            ctxt->port, 
312
            port, 
306
            /* Accept policy callback and arg */
313
            /* Accept policy callback and arg */
307
            accept_policy, NULL, 
314
            accept_policy, NULL, 
308
            /* handler and arg */
315
            /* handler and arg */
309
            &answer_to_connection, NULL, 
316
            &answer_to_connection, NULL, 
310
            MHD_OPTION_END);
317
            MHD_OPTION_END);