You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.8 KiB

  1. --- a/src/libpiano/config.h
  2. +++ /dev/null
  3. @@ -1 +0,0 @@
  4. -#define PACKAGE "libpiano"
  5. --- a/src/libwaitress/config.h
  6. +++ /dev/null
  7. @@ -1 +0,0 @@
  8. -#define PACKAGE "libwaitress"
  9. --- a/src/libpiano/piano.h
  10. +++ b/src/libpiano/piano.h
  11. @@ -39,6 +39,8 @@ THE SOFTWARE.
  12. * http://pan-do-ra-api.wikia.com
  13. */
  14. +#define LIBPIANO_NAME "libpiano"
  15. +
  16. #define PIANO_RPC_HOST "tuner.pandora.com"
  17. #define PIANO_RPC_PATH "/services/json/?"
  18. --- a/src/libwaitress/waitress.c
  19. +++ b/src/libwaitress/waitress.c
  20. @@ -922,14 +922,14 @@ static WaitressReturn_t WaitressSendRequ
  21. if (WaitressProxyEnabled (waith) && !waith->url.tls) {
  22. snprintf (buf, WAITRESS_BUFFER_SIZE,
  23. "%s http://%s:%s/%s HTTP/" WAITRESS_HTTP_VERSION "\r\n"
  24. - "Host: %s\r\nUser-Agent: " PACKAGE "\r\nConnection: Close\r\n",
  25. + "Host: %s\r\nUser-Agent: " LIBWAITRESS_NAME "\r\nConnection: Close\r\n",
  26. (waith->method == WAITRESS_METHOD_GET ? "GET" : "POST"),
  27. waith->url.host,
  28. WaitressDefaultPort (&waith->url), path, waith->url.host);
  29. } else {
  30. snprintf (buf, WAITRESS_BUFFER_SIZE,
  31. "%s /%s HTTP/" WAITRESS_HTTP_VERSION "\r\n"
  32. - "Host: %s\r\nUser-Agent: " PACKAGE "\r\nConnection: Close\r\n",
  33. + "Host: %s\r\nUser-Agent: " LIBWAITRESS_NAME "\r\nConnection: Close\r\n",
  34. (waith->method == WAITRESS_METHOD_GET ? "GET" : "POST"),
  35. path, waith->url.host);
  36. }
  37. --- a/src/libwaitress/waitress.h
  38. +++ b/src/libwaitress/waitress.h
  39. @@ -29,6 +29,8 @@ THE SOFTWARE.
  40. #include <stdbool.h>
  41. #include <gnutls/gnutls.h>
  42. +#define LIBWAITRESS_NAME "libwaitress"
  43. +
  44. #define WAITRESS_BUFFER_SIZE 10*1024
  45. typedef enum {
  46. --- a/src/libpiano/request.c
  47. +++ b/src/libpiano/request.c
  48. @@ -40,6 +40,7 @@ THE SOFTWARE.
  49. #include <stdio.h>
  50. #include <string.h>
  51. /* needed for urlencode */
  52. +#include <config.h>
  53. #include <waitress.h>
  54. #include "piano.h"