Skip to content

Commit

Permalink
Move avahi client defs to avahi.h
Browse files Browse the repository at this point in the history
  • Loading branch information
ka9q committed Mar 16, 2024
1 parent 1a04e60 commit 414f5d0
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 14 deletions.
1 change: 1 addition & 0 deletions avahi.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include "avahi.h"
#include "misc.h"
#include "multicast.h"

Expand Down
15 changes: 2 additions & 13 deletions avahi_browse.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,13 @@
#include <avahi-common/malloc.h>
#include <avahi-common/error.h>

struct db {
struct db *next;
struct db *prev;
char *name;
char *type;
char *domain;
char *host_name;
AvahiAddress address;
uint16_t port;
char *txt;
AvahiLookupResultFlags flags;
};
#include "avahi.h"

struct db *Database;


static pthread_mutex_t Browser_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t Browser_cond = PTHREAD_COND_INITIALIZER;
void *avahi_browser_thread(void *);

static AvahiSimplePoll *simple_poll = NULL;
static void resolve_callback(
Expand Down
1 change: 1 addition & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "filter.h"
#include "status.h"
#include "config.h"
#include "avahi.h"

// Configuration constants & defaults
static char const DEFAULT_PRESET[] = "am";
Expand Down
1 change: 0 additions & 1 deletion misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ int pipefill(int,void *,int);
void chomp(char *);
uint32_t ElfHash(uint8_t const *s,int length);
uint32_t ElfHashString(char const *s);
int avahi_start(char const *service_name,char const *service_type,int service_port,char const *dns_name,int base_address,char const *description,void *,int *);

// Modified Bessel functions
float i0(float const z); // 0th kind
Expand Down
1 change: 1 addition & 0 deletions opusd.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "multicast.h"
#include "status.h"
#include "iir.h"
#include "avahi.h"

#define BUFFERSIZE 16384 // Big enough for 120 ms @ 48 kHz stereo (11,520 16-bit samples)

Expand Down
1 change: 1 addition & 0 deletions packetd.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "multicast.h"
#include "ax25.h"
#include "status.h"
#include "avahi.h"

struct hdlc {
uint8_t frame[16384];
Expand Down
1 change: 1 addition & 0 deletions rdsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "status.h"
#include "filter.h"
#include "iir.h"
#include "avahi.h"

struct session {
struct session *prev; // Linked list pointers
Expand Down
1 change: 1 addition & 0 deletions stereod.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "status.h"
#include "filter.h"
#include "iir.h"
#include "avahi.h"

#define BUFFERSIZE 16384 // Tune this

Expand Down

0 comments on commit 414f5d0

Please sign in to comment.