~ubuntu-branches/ubuntu/trusty/mpd/trusty

« back to all changes in this revision

Viewing changes to src/output/httpd_client.c

  • Committer: Bazaar Package Importer
  • Author(s): Angel Abad
  • Date: 2011-02-02 12:26:30 UTC
  • mfrom: (1.5.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20110202122630-bdyx8w4k94doz4fs
Tags: 0.16.1-1ubuntu1
* Merge from debian unstable. Remaining changes:
  - debian/control:
    + Don't build-depend on libmikmod2-dev (Debian bug #510675).
    + Move avahi-daemon from Suggests field to Recommends field.
  - debian/mpd.init.d:
    + Read mpd user from mpd.conf.
  - debian/control, debian/rules:
    + Add libmp3lame-dev to the build dependencies and enable lame.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2003-2009 The Music Player Daemon Project
 
2
 * Copyright (C) 2003-2010 The Music Player Daemon Project
3
3
 * http://www.musicpd.org
4
4
 *
5
5
 * This program is free software; you can redistribute it and/or modify
17
17
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
18
 */
19
19
 
 
20
#include "config.h"
20
21
#include "httpd_client.h"
21
22
#include "httpd_internal.h"
22
23
#include "fifo_buffer.h"
23
24
#include "page.h"
24
25
#include "icy_server.h"
 
26
#include "glib_compat.h"
25
27
 
26
28
#include <stdbool.h>
27
29
#include <assert.h>
28
30
#include <string.h>
29
31
 
 
32
#undef G_LOG_DOMAIN
 
33
#define G_LOG_DOMAIN "httpd_output"
 
34
 
30
35
struct httpd_client {
31
36
        /**
32
37
         * The httpd output object this client is connected to.
280
285
        } else {
281
286
                gchar *metadata_header;
282
287
 
283
 
                metadata_header = icy_server_metadata_header("Add config information here!", /* TODO */
284
 
                                                             "Add config information here!", /* TODO */
285
 
                                                             "Add config information here!", /* TODO */
286
 
                                                             client->httpd->content_type,
287
 
                                                             client->metaint);
 
288
                metadata_header = icy_server_metadata_header(
 
289
                        client->httpd->name,
 
290
                        client->httpd->genre,
 
291
                        client->httpd->website,
 
292
                        client->httpd->content_type,
 
293
                        client->metaint);
288
294
 
289
295
                g_strlcpy(buffer, metadata_header, sizeof(buffer));
290
296
 
482
488
        return size;
483
489
}
484
490
 
485
 
/* g_queue_clear() was introduced in GLib 2.14 */
486
 
#if !GLIB_CHECK_VERSION(2,14,0)
487
 
#define g_queue_clear(q) do { g_queue_free(q); q = g_queue_new(); } while (0)
488
 
#endif
489
 
 
490
491
void
491
492
httpd_client_cancel(struct httpd_client *client)
492
493
{