player: make port unsigned short
TCP ports are unsigned 16 bit integer, so let's use a more natural type for it.
This commit is contained in:
parent
c600e2abbe
commit
fbc958adeb
@ -20,7 +20,7 @@ static const char *sync_track_path(const char *base, const char *name)
|
|||||||
|
|
||||||
#ifndef SYNC_PLAYER
|
#ifndef SYNC_PLAYER
|
||||||
|
|
||||||
static SOCKET server_connect(const char *host, int nport)
|
static SOCKET server_connect(const char *host, unsigned short nport)
|
||||||
{
|
{
|
||||||
struct hostent *he;
|
struct hostent *he;
|
||||||
struct sockaddr_in sa;
|
struct sockaddr_in sa;
|
||||||
@ -222,7 +222,7 @@ static int purge_and_rerequest(struct sync_device *d)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sync_connect(struct sync_device *d, const char *host, int port)
|
int sync_connect(struct sync_device *d, const char *host, unsigned short port)
|
||||||
{
|
{
|
||||||
if (d->sock != INVALID_SOCKET)
|
if (d->sock != INVALID_SOCKET)
|
||||||
closesocket(d->sock);
|
closesocket(d->sock);
|
||||||
|
|||||||
@ -23,7 +23,7 @@ struct sync_cb {
|
|||||||
};
|
};
|
||||||
void sync_set_callbacks(struct sync_device *, struct sync_cb *, void *);
|
void sync_set_callbacks(struct sync_device *, struct sync_cb *, void *);
|
||||||
#define SYNC_DEFAULT_PORT 1338
|
#define SYNC_DEFAULT_PORT 1338
|
||||||
int sync_connect(struct sync_device *, const char *, int port);
|
int sync_connect(struct sync_device *, const char *, unsigned short);
|
||||||
int sync_update(struct sync_device *, int);
|
int sync_update(struct sync_device *, int);
|
||||||
#endif /* !defined(SYNC_PLAYER) */
|
#endif /* !defined(SYNC_PLAYER) */
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user