Skip to content

Commit

Permalink
1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe44 committed Sep 27, 2023
1 parent 3d4a4ec commit 84fa584
Show file tree
Hide file tree
Showing 77 changed files with 62 additions and 95 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.2.1
- (airupnp) unified source with spotconnect
- display iface and network at start
- update XML_UpdateNode bug

1.2.0
- use libraop version that re-sends HTTP when *explictely* request a range 0-XXX to try to cope with player that don't understand what HTTP protocol is and keep askign for a small "chunk"
- aircast display iface name upon startup
Expand Down
4 changes: 2 additions & 2 deletions aircast/src/aircast.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ static bool AddCastDevice(struct sMR *Device, char *Name, char *UDN, bool group,
}
}

LOG_INFO("[%p]: adding renderer (%s) with mac %hX%X", Device, Name, *(uint16_t*) Device->Config.mac, *(uint32_t*) (Device->Config.mac + 2));
LOG_INFO("[%p]: adding renderer (%s - %s:%hu) with mac %hX%X", Device, Name, inet_ntoa(ip), port, *(uint16_t*) Device->Config.mac, *(uint32_t*) (Device->Config.mac + 2));

Device->CastCtx = CreateCastDevice(Device, Device->Group, Device->Config.StopReceiver, ip, port, Device->Config.MediaVolume);
pthread_create(&Device->Thread, NULL, &MRThread, Device);
Expand Down Expand Up @@ -679,7 +679,7 @@ static bool Start(bool cold) {
// must bind to an address
char* iface = NULL;
glHost = get_interface(!strchr(glBinding, '?') ? glBinding : NULL, &iface, &glNetmask);
LOG_INFO("Binding to %s@%s", iface, inet_ntoa(glHost));
LOG_INFO("Binding to %s [%s] with mask 0x%08x", inet_ntoa(glHost), iface, ntohl(glNetmask));
NFREE(iface);

// can't find a suitable interface
Expand Down
2 changes: 1 addition & 1 deletion aircast/src/aircast.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "raop_server.h"
#include "cast_util.h"

#define VERSION "v1.2.0"" ("__DATE__" @ "__TIME__")"
#define VERSION "v1.2.1"" ("__DATE__" @ "__TIME__")"

/*----------------------------------------------------------------------------*/
/* typedefs */
Expand Down
2 changes: 1 addition & 1 deletion aircast/src/castcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ bool CastConnect(struct sCastCtx *Ctx) {
addr.sin_addr.s_addr = Ctx->ip.s_addr;
addr.sin_port = htons(Ctx->port);

err = tcp_connect_timeout(Ctx->sock, addr, 2*1000);
err = tcp_connect_timeout(Ctx->sock, addr, 3*1000);

if (err) {
closesocket(Ctx->sock);
Expand Down
6 changes: 4 additions & 2 deletions airupnp/src/airupnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ static void *MRThread(void *args) {

// clean our stuff before exiting
AVTActionFlush(&p->ActionQueue);
LOG_INFO("[%p] player thread exited", p);

return NULL;
}
Expand Down Expand Up @@ -1083,7 +1084,7 @@ static bool Start(bool cold) {
// only set iface name if it's a name
int rc = UpnpInit2(iface, glPort);

LOG_INFO("Binding to iface %s@%s:%hu", iface, inet_ntoa(glHost), glPort);
LOG_INFO("Binding to iface %s:%hu [%s]", inet_ntoa(glHost), glPort, iface);
NFREE(iface);

if (rc != UPNP_E_SUCCESS) {
Expand Down Expand Up @@ -1457,9 +1458,10 @@ int main(int argc, char *argv[]) {

for (int i = 0; i < glMaxDevices; i++) {
struct sMR *p = &glMRDevices[i];
bool Locked = pthread_mutex_trylock(&p->Mutex);

bool Locked = pthread_mutex_trylock(&p->Mutex);
if (!Locked) pthread_mutex_unlock(&p->Mutex);

if (!p->Running && !all) continue;
printf("%20.20s [r:%u] [l:%u] [s:%u] Last:%u eCnt:%u\n",
p->Config.Name, p->Running, Locked, p->State,
Expand Down
2 changes: 1 addition & 1 deletion airupnp/src/airupnp.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "cross_util.h"
#include "metadata.h"

#define VERSION "v1.2.0"" ("__DATE__" @ "__TIME__")"
#define VERSION "v1.2.1"" ("__DATE__" @ "__TIME__")"

/*----------------------------------------------------------------------------*/
/* typedefs */
Expand Down
5 changes: 2 additions & 3 deletions airupnp/src/avt_util.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* AirUPnP - UPnP control utils
* UPnP control utils
*
* (c) Philippe, [email protected]
*
Expand All @@ -12,7 +12,6 @@
#include "platform.h"
#include "ixmlextra.h"
#include "upnptools.h"
#include "airupnp.h"
#include "cross_log.h"
#include "avt_util.h"

Expand Down Expand Up @@ -167,7 +166,7 @@ bool AVTSeek(struct sMR *Device, unsigned Interval)
IXML_Document *ActionNode = NULL;
char params[128];

LOG_INFO("[%p]: uPNP seek (%ds) (cookie %p)", Device, Interval, Device->seqN);
LOG_INFO("[%p]: uPNP seek (%.2lf sec) (cookie %p)", Device, Interval / 1000.0, Device->seqN);

if ((ActionNode = UpnpMakeAction("Seek", Service->Type, 0, NULL)) == NULL) return false;
UpnpAddToAction(&ActionNode, "Seek", Service->Type, "InstanceID", "0");
Expand Down
3 changes: 2 additions & 1 deletion airupnp/src/avt_util.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* UPnP Control util
* UPnP control util
*
* (c) Philippe, [email protected]
*
Expand All @@ -10,6 +10,7 @@
#pragma once

#include "ixml.h"
#include "airupnp.h"

struct sMRConfig;
struct sMR;
Expand Down
Loading

0 comments on commit 84fa584

Please sign in to comment.