1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-05-29 20:44:10 +00:00

Fix: use long types for strtol return value

This commit is contained in:
jcorporation 2018-08-22 13:25:02 +01:00
parent 01496c15b6
commit b7cee0a617
2 changed files with 7 additions and 7 deletions

View File

@ -528,7 +528,7 @@ void mympd_idle(struct mg_mgr *s, int timeout) {
switch (mpd.conn_state) { switch (mpd.conn_state) {
case MPD_DISCONNECTED: case MPD_DISCONNECTED:
/* Try to connect */ /* Try to connect */
fprintf(stdout, "MPD Connecting to %s:%d\n", config.mpdhost, config.mpdport); fprintf(stdout, "MPD Connecting to %s: %ld\n", config.mpdhost, config.mpdport);
mpd.conn = mpd_connection_new(config.mpdhost, config.mpdport, mpd.timeout); mpd.conn = mpd_connection_new(config.mpdhost, config.mpdport, mpd.timeout);
if (mpd.conn == NULL) { if (mpd.conn == NULL) {
fprintf(stderr, "Out of memory."); fprintf(stderr, "Out of memory.");

View File

@ -129,7 +129,7 @@ struct t_mpd {
} mpd; } mpd;
typedef struct { typedef struct {
int mpdport; long mpdport;
const char* mpdhost; const char* mpdhost;
const char* mpdpass; const char* mpdpass;
const char* webport; const char* webport;
@ -138,7 +138,7 @@ typedef struct {
const char* sslcert; const char* sslcert;
const char* sslkey; const char* sslkey;
const char* user; const char* user;
int streamport; long streamport;
const char* coverimage; const char* coverimage;
const char* statefile; const char* statefile;
bool stickers; bool stickers;
@ -148,10 +148,10 @@ typedef struct {
t_config config; t_config config;
typedef struct { typedef struct {
int playCount; long playCount;
int skipCount; long skipCount;
int lastPlayed; long lastPlayed;
int like; long like;
} t_sticker; } t_sticker;
static int is_websocket(const struct mg_connection *nc) { static int is_websocket(const struct mg_connection *nc) {