summaryrefslogtreecommitdiffstats
path: root/avahi-compat-howl
diff options
context:
space:
mode:
Diffstat (limited to 'avahi-compat-howl')
-rw-r--r--avahi-compat-howl/address-test.c10
-rw-r--r--avahi-compat-howl/address.c26
-rw-r--r--avahi-compat-howl/browse-domain-test.c14
-rw-r--r--avahi-compat-howl/compat.c208
-rw-r--r--avahi-compat-howl/include/corby/buffer.h40
-rw-r--r--avahi-compat-howl/include/corby/channel.h6
-rw-r--r--avahi-compat-howl/include/corby/corby.h6
-rw-r--r--avahi-compat-howl/include/corby/message.h4
-rw-r--r--avahi-compat-howl/include/corby/object.h4
-rw-r--r--avahi-compat-howl/include/corby/orb.h8
-rw-r--r--avahi-compat-howl/include/discovery/discovery.h18
-rw-r--r--avahi-compat-howl/include/discovery/text_record.h2
-rw-r--r--avahi-compat-howl/include/howl.h2
-rw-r--r--avahi-compat-howl/include/rendezvous/rendezvous.h2
-rw-r--r--avahi-compat-howl/include/rendezvous/text_record.h2
-rw-r--r--avahi-compat-howl/include/salt/address.h4
-rw-r--r--avahi-compat-howl/include/salt/debug.h4
-rw-r--r--avahi-compat-howl/include/salt/interface.h2
-rw-r--r--avahi-compat-howl/include/salt/platform.h14
-rw-r--r--avahi-compat-howl/include/salt/salt.h24
-rw-r--r--avahi-compat-howl/include/salt/signal.h6
-rw-r--r--avahi-compat-howl/include/salt/socket.h54
-rw-r--r--avahi-compat-howl/include/salt/time.h6
-rw-r--r--avahi-compat-howl/samples/browse.c4
-rw-r--r--avahi-compat-howl/samples/publish.c2
-rw-r--r--avahi-compat-howl/samples/query.c4
-rw-r--r--avahi-compat-howl/samples/resolve.c4
-rw-r--r--avahi-compat-howl/text-test.c10
-rw-r--r--avahi-compat-howl/text.c44
-rw-r--r--avahi-compat-howl/unsupported.c40
-rw-r--r--avahi-compat-howl/warn.c6
-rw-r--r--avahi-compat-howl/warn.h6
32 files changed, 293 insertions, 293 deletions
diff --git a/avahi-compat-howl/address-test.c b/avahi-compat-howl/address-test.c
index 05276aa..cdb6a6e 100644
--- a/avahi-compat-howl/address-test.c
+++ b/avahi-compat-howl/address-test.c
@@ -2,17 +2,17 @@
/***
This file is part of avahi.
-
+
avahi is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
-
+
avahi is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public
License along with avahi; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -41,13 +41,13 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
ASSERT_SW_OKAY(sw_ipv4_address_init_from_name(&a, "heise.de"));
ASSERT_NOT_NULL(sw_ipv4_address_name(a, t, sizeof(t)));
printf("%s\n", t);
-
+
ASSERT_SW_OKAY(sw_ipv4_address_init_from_this_host(&a));
ASSERT_NOT_NULL(sw_ipv4_address_name(a, t, sizeof(t)));
printf("%s\n", t);
ASSERT_SW_OKAY(sw_ipv4_address_decompose(a, &a1, &a2, &a3, &a4));
printf("%i.%i.%i.%i\n", a1, a2, a3, a4);
-
+
return 0;
}
diff --git a/avahi-compat-howl/address.c b/avahi-compat-howl/address.c
index 1d9fbbe..3805a61 100644
--- a/avahi-compat-howl/address.c
+++ b/avahi-compat-howl/address.c
@@ -2,17 +2,17 @@
/***
This file is part of avahi.
-
+
avahi is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
-
+
avahi is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public
License along with avahi; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -85,10 +85,10 @@ sw_result sw_ipv4_address_init_from_name(
assert(name);
AVAHI_WARN_LINKAGE;
-
+
if (!(he = gethostbyname(name)))
return SW_E_UNKNOWN;
-
+
self->m_addr = *(uint32_t*) he->h_addr;
return SW_OKAY;
}
@@ -113,7 +113,7 @@ sw_result sw_ipv4_address_init_from_this_host(sw_ipv4_address *self) {
assert(self);
AVAHI_WARN_LINKAGE;
-
+
/* This is so fucked up ... */
memset(&sa, 0, sizeof(sa));
@@ -135,7 +135,7 @@ sw_result sw_ipv4_address_init_from_this_host(sw_ipv4_address *self) {
close(fd);
self->m_addr = sa.sin_addr.s_addr;
-
+
return SW_OKAY;
}
@@ -144,7 +144,7 @@ sw_result sw_ipv4_address_fina(AVAHI_GCC_UNUSED sw_ipv4_address self) {
AVAHI_WARN_LINKAGE;
/* This is ridiculous ... */
-
+
return SW_OKAY;
}
@@ -170,10 +170,10 @@ sw_string sw_ipv4_address_name(
if (len < INET_ADDRSTRLEN)
return NULL;
-
+
if (!(inet_ntop(AF_INET, &self.m_addr, name, len)))
return NULL;
-
+
return name;
}
@@ -187,9 +187,9 @@ sw_result sw_ipv4_address_decompose(
uint32_t a;
AVAHI_WARN_LINKAGE;
-
+
a = ntohl(self.m_addr);
-
+
assert(a1);
assert(a2);
assert(a3);
@@ -199,7 +199,7 @@ sw_result sw_ipv4_address_decompose(
*a2 = (uint8_t) (a >> 16);
*a3 = (uint8_t) (a >> 8);
*a4 = (uint8_t) (a);
-
+
return SW_OKAY;
}
diff --git a/avahi-compat-howl/browse-domain-test.c b/avahi-compat-howl/browse-domain-test.c
index be99d92..6dac23c 100644
--- a/avahi-compat-howl/browse-domain-test.c
+++ b/avahi-compat-howl/browse-domain-test.c
@@ -2,17 +2,17 @@
/***
This file is part of avahi.
-
+
avahi is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
-
+
avahi is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public
License along with avahi; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -54,7 +54,7 @@ static sw_result reply(
case SW_DISCOVERY_BROWSE_INVALID:
fprintf(stderr, "some kind of failure happened: %s\n", domain);
break;
-
+
default:
abort();
}
@@ -65,12 +65,12 @@ static sw_result reply(
int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
sw_discovery discovery;
sw_discovery_oid oid;
-
+
ASSERT_SW_OKAY(sw_discovery_init(&discovery));
ASSERT_SW_OKAY(sw_discovery_browse_domains(discovery, 0, reply, NULL, &oid));
-
+
ASSERT_SW_OKAY(sw_discovery_run(discovery));
-
+
return 0;
}
diff --git a/avahi-compat-howl/compat.c b/avahi-compat-howl/compat.c
index e436208..12a82fa 100644
--- a/avahi-compat-howl/compat.c
+++ b/avahi-compat-howl/compat.c
@@ -2,17 +2,17 @@
/***
This file is part of avahi.
-
+
avahi is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
-
+
avahi is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public
License along with avahi; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -87,7 +87,7 @@ struct _sw_discovery {
sw_discovery_oid oid_index;
int thread_fd, main_fd;
-
+
pthread_t thread;
int thread_running;
@@ -121,7 +121,7 @@ static sw_result map_error(int error) {
switch (error) {
case AVAHI_OK:
return SW_OKAY;
-
+
case AVAHI_ERR_NO_MEMORY:
return SW_E_MEM;
}
@@ -134,7 +134,7 @@ static int read_command(int fd) {
char command;
assert(fd >= 0);
-
+
if ((r = read(fd, &command, 1)) != 1) {
fprintf(stderr, __FILE__": read() failed: %s\n", r < 0 ? strerror(errno) : "EOF");
return -1;
@@ -157,9 +157,9 @@ static int write_command(int fd, char reply) {
static int poll_func(struct pollfd *ufds, unsigned int nfds, int timeout, void *userdata) {
sw_discovery self = userdata;
int ret;
-
+
assert(self);
-
+
ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
ret = poll(ufds, nfds, timeout);
ASSERT_SUCCESS(pthread_mutex_lock(&self->mutex));
@@ -173,7 +173,7 @@ static void * thread_func(void *data) {
sigfillset(&mask);
pthread_sigmask(SIG_BLOCK, &mask, NULL);
-
+
self->thread = pthread_self();
self->thread_running = 1;
@@ -184,7 +184,7 @@ static void * thread_func(void *data) {
break;
/* fprintf(stderr, "Command: %c\n", command); */
-
+
switch (command) {
case COMMAND_POLL: {
@@ -194,30 +194,30 @@ static void * thread_func(void *data) {
for (;;) {
errno = 0;
-
+
if ((ret = avahi_simple_poll_run(self->simple_poll)) < 0) {
-
+
if (errno == EINTR)
continue;
-
+
fprintf(stderr, __FILE__": avahi_simple_poll_run() failed: %s\n", strerror(errno));
}
break;
}
-
+
ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
-
+
if (write_command(self->thread_fd, ret < 0 ? COMMAND_POLL_FAILED : COMMAND_POLL_DONE) < 0)
break;
-
+
break;
}
case COMMAND_QUIT:
return NULL;
}
-
+
}
return NULL;
@@ -231,13 +231,13 @@ static int oid_alloc(sw_discovery self, oid_type type) {
while (self->oid_index >= OID_MAX)
self->oid_index -= OID_MAX;
-
+
if (self->oid_table[self->oid_index].type == OID_UNUSED) {
self->oid_table[self->oid_index].type = type;
self->oid_table[self->oid_index].discovery = self;
assert(OID_GET_INDEX(&self->oid_table[self->oid_index]) == self->oid_index);
-
+
return self->oid_index ++;
}
@@ -245,7 +245,7 @@ static int oid_alloc(sw_discovery self, oid_type type) {
}
/* No free entry found */
-
+
return (sw_discovery_oid) -1;
}
@@ -271,22 +271,22 @@ static oid_data* oid_get(sw_discovery self, sw_discovery_oid oid) {
if (self->oid_table[oid].type == OID_UNUSED)
return NULL;
-
+
return &self->oid_table[oid];
}
static service_data* service_data_new(sw_discovery self) {
service_data *sdata;
-
+
assert(self);
if (!(sdata = avahi_new0(service_data, 1)))
return NULL;
AVAHI_LLIST_PREPEND(service_data, services, self->services, sdata);
-
+
return sdata;
-
+
}
static void service_data_free(sw_discovery self, service_data* sdata) {
@@ -294,7 +294,7 @@ static void service_data_free(sw_discovery self, service_data* sdata) {
assert(sdata);
AVAHI_LLIST_REMOVE(service_data, services, self->services, sdata);
-
+
avahi_free(sdata->name);
avahi_free(sdata->regtype);
avahi_free(sdata->domain);
@@ -308,12 +308,12 @@ static void reg_client_callback(oid_data *data, AvahiClientState state);
static void client_callback(AvahiClient *s, AvahiClientState state, void* userdata) {
sw_discovery self = userdata;
sw_discovery_oid oid;
-
+
assert(s);
assert(self);
discovery_ref(self);
-
+
for (oid = 0; oid < OID_MAX; oid++) {
switch (self->oid_table[oid].type) {
@@ -341,16 +341,16 @@ sw_result sw_discovery_init(sw_discovery * self) {
sw_result result = SW_E_UNKNOWN;
pthread_mutexattr_t mutex_attr;
int error;
-
+
assert(self);
-
+
AVAHI_WARN_LINKAGE;
*self = NULL;
if (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0)
goto fail;
-
+
if (!(*self = avahi_new(struct _sw_discovery, 1))) {
result = SW_E_MEM;
goto fail;
@@ -365,7 +365,7 @@ sw_result sw_discovery_init(sw_discovery * self) {
memset((*self)->oid_table, 0, sizeof((*self)->oid_table));
(*self)->oid_index = 0;
-
+
(*self)->thread_running = 0;
AVAHI_LLIST_HEAD_INIT(service_info, (*self)->services);
@@ -384,7 +384,7 @@ sw_result sw_discovery_init(sw_discovery * self) {
result = map_error(error);
goto fail;
}
-
+
/* Start simple poll */
if (avahi_simple_poll_prepare((*self)->simple_poll, -1) < 0)
goto fail;
@@ -392,12 +392,12 @@ sw_result sw_discovery_init(sw_discovery * self) {
/* Queue an initial POLL command for the thread */
if (write_command((*self)->main_fd, COMMAND_POLL) < 0)
goto fail;
-
+
if (pthread_create(&(*self)->thread, NULL, thread_func, *self) != 0)
goto fail;
(*self)->thread_running = 1;
-
+
return SW_OKAY;
fail:
@@ -416,9 +416,9 @@ static int stop_thread(sw_discovery self) {
if (write_command(self->main_fd, COMMAND_QUIT) < 0)
return -1;
-
+
avahi_simple_poll_wakeup(self->simple_poll);
-
+
ASSERT_SUCCESS(pthread_join(self->thread, NULL));
self->thread_running = 0;
return 0;
@@ -459,24 +459,24 @@ static void discovery_unref(sw_discovery self) {
while (self->services)
service_data_free(self, self->services);
-
+
avahi_free(self);
}
sw_result sw_discovery_fina(sw_discovery self) {
assert(self);
-
+
AVAHI_WARN_LINKAGE;
stop_thread(self);
discovery_unref(self);
-
+
return SW_OKAY;
}
sw_result sw_discovery_run(sw_discovery self) {
assert(self);
-
+
AVAHI_WARN_LINKAGE;
return sw_salt_run((sw_salt) self);
@@ -484,7 +484,7 @@ sw_result sw_discovery_run(sw_discovery self) {
sw_result sw_discovery_stop_run(sw_discovery self) {
assert(self);
-
+
AVAHI_WARN_LINKAGE;
return sw_salt_stop_run((sw_salt) self);
@@ -492,7 +492,7 @@ sw_result sw_discovery_stop_run(sw_discovery self) {
int sw_discovery_socket(sw_discovery self) {
assert(self);
-
+
AVAHI_WARN_LINKAGE;
return self->main_fd;
@@ -500,17 +500,17 @@ int sw_discovery_socket(sw_discovery self) {
sw_result sw_discovery_read_socket(sw_discovery self) {
sw_result result = SW_E_UNKNOWN;
-
+
assert(self);
discovery_ref(self);
ASSERT_SUCCESS(pthread_mutex_lock(&self->mutex));
-
+
/* Cleanup notification socket */
if (read_command(self->main_fd) != COMMAND_POLL_DONE)
goto finish;
-
+
if (avahi_simple_poll_dispatch(self->simple_poll) < 0)
goto finish;
@@ -525,26 +525,26 @@ sw_result sw_discovery_read_socket(sw_discovery self) {
/* Request the poll */
if (write_command(self->main_fd, COMMAND_POLL) < 0)
goto finish;
-
+
result = SW_OKAY;
-
+
finish:
ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
discovery_unref(self);
-
+
return result;
}
sw_result sw_discovery_salt(sw_discovery self, sw_salt *salt) {
assert(self);
assert(salt);
-
+
AVAHI_WARN_LINKAGE;
*salt = (sw_salt) self;
-
+
return SW_OKAY;
}
@@ -557,34 +557,34 @@ sw_result sw_salt_step(sw_salt self, sw_uint32 * msec) {
if (!((sw_discovery) self)->thread_running)
return SW_E_UNKNOWN;
-
+
memset(&p, 0, sizeof(p));
p.fd = ((sw_discovery) self)->main_fd;
p.events = POLLIN;
if ((r = poll(&p, 1, msec ? (int) *msec : -1)) < 0) {
-
+
/* Don't treat EINTR as error */
if (errno == EINTR)
return SW_OKAY;
-
+
return SW_E_UNKNOWN;
-
+
} else if (r == 0) {
-
+
/* Timeoout */
return SW_OKAY;
} else {
/* Success */
-
+
if (p.revents != POLLIN)
return SW_E_UNKNOWN;
if ((result = sw_discovery_read_socket((sw_discovery) self)) != SW_OKAY)
return result;
}
-
+
return SW_OKAY;
}
@@ -594,7 +594,7 @@ sw_result sw_salt_run(sw_salt self) {
AVAHI_WARN_LINKAGE;
assert(self);
-
+
for (;;)
if ((ret = sw_salt_step(self, NULL)) != SW_OKAY)
return ret;
@@ -622,7 +622,7 @@ sw_result sw_salt_lock(sw_salt self) {
sw_result sw_salt_unlock(sw_salt self) {
assert(self);
-
+
AVAHI_WARN_LINKAGE;
ASSERT_SUCCESS(pthread_mutex_unlock(&((sw_discovery) self)->salt_mutex));
@@ -634,9 +634,9 @@ static void reg_report_status(oid_data *data, sw_discovery_publish_status status
sw_discovery_publish_reply reply;
assert(data);
-
+
reply = (sw_discovery_publish_reply) data->reply;
-
+
reply(data->discovery,
OID_GET_INDEX(data),
status,
@@ -646,11 +646,11 @@ static void reg_report_status(oid_data *data, sw_discovery_publish_status status
static int reg_create_service(oid_data *data) {
int ret;
const char *real_type;
-
+
assert(data);
real_type = avahi_get_type_from_subtype(data->service_data->regtype);
-
+
if ((ret = avahi_entry_group_add_service_strlst(
data->object,
data->service_data->interface,
@@ -663,7 +663,7 @@ static int reg_create_service(oid_data *data) {
data->service_data->port,
data->service_data->txt)) < 0)
return ret;
-
+
if (real_type) {
/* Create a subtype entry */
@@ -692,12 +692,12 @@ static void reg_client_callback(oid_data *data, AvahiClientState state) {
/* We've not been setup completely */
if (!data->object)
return;
-
+
switch (state) {
case AVAHI_CLIENT_FAILURE:
reg_report_status(data, SW_DISCOVERY_PUBLISH_INVALID);
break;
-
+
case AVAHI_CLIENT_S_RUNNING: {
int ret;
@@ -706,10 +706,10 @@ static void reg_client_callback(oid_data *data, AvahiClientState state) {
reg_report_status(data, SW_DISCOVERY_PUBLISH_INVALID);
return;
}
-
+
break;
}
-
+
case AVAHI_CLIENT_S_COLLISION:
case AVAHI_CLIENT_S_REGISTERING:
@@ -749,7 +749,7 @@ static void reg_entry_group_callback(AvahiEntryGroup *g, AvahiEntryGroupState st
case AVAHI_ENTRY_GROUP_FAILURE:
reg_report_status(data, SW_DISCOVERY_PUBLISH_INVALID);
break;
-
+
}
}
@@ -771,13 +771,13 @@ sw_result sw_discovery_publish(
sw_result result = SW_E_UNKNOWN;
service_data *sdata;
AvahiStringList *txt = NULL;
-
+
assert(self);
assert(name);
assert(type);
assert(reply);
assert(oid);
-
+
AVAHI_WARN_LINKAGE;
if (text_record && text_record_len > 0)
@@ -820,7 +820,7 @@ sw_result sw_discovery_publish(
if (avahi_client_get_state(self->client) == AVAHI_CLIENT_S_RUNNING) {
int error;
-
+
if ((error = reg_create_service(data)) < 0) {
result = map_error(error);
goto finish;
@@ -832,8 +832,8 @@ sw_result sw_discovery_publish(
finish:
ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
-
- if (result != SW_OKAY)
+
+ if (result != SW_OKAY)
if (*oid != (sw_discovery_oid) -1)
sw_discovery_cancel(self, *oid);
@@ -872,7 +872,7 @@ static void domain_browser_callback(
case AVAHI_BROWSER_FAILURE:
reply(data->discovery, OID_GET_INDEX(data), SW_DISCOVERY_BROWSE_INVALID, interface, NULL, NULL, domain, data->extra);
break;
-
+
case AVAHI_BROWSER_CACHE_EXHAUSTED:
case AVAHI_BROWSER_ALL_FOR_NOW:
break;
@@ -885,15 +885,15 @@ sw_result sw_discovery_browse_domains(
sw_discovery_browse_reply reply,
sw_opaque extra,
sw_discovery_oid * oid) {
-
+
oid_data *data;
AvahiIfIndex ifindex;
sw_result result = SW_E_UNKNOWN;
-
+
assert(self);
assert(reply);
assert(oid);
-
+
AVAHI_WARN_LINKAGE;
if ((*oid = oid_alloc(self, OID_DOMAIN_BROWSER)) == (sw_discovery_oid) -1)
@@ -903,11 +903,11 @@ sw_result sw_discovery_browse_domains(
assert(data);
data->reply = (sw_result (*)(void)) reply;
data->extra = extra;
-
+
ifindex = interface_index == 0 ? AVAHI_IF_UNSPEC : (AvahiIfIndex) interface_index;
ASSERT_SUCCESS(pthread_mutex_lock(&self->mutex));
-
+
if (!(data->object = avahi_domain_browser_new(self->client, ifindex, AVAHI_PROTO_INET, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, domain_browser_callback, data))) {
result = map_error(avahi_client_errno(self->client));
goto finish;
@@ -918,7 +918,7 @@ sw_result sw_discovery_browse_domains(
finish:
ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
-
+
if (result != SW_OKAY)
if (*oid != (sw_discovery_oid) -1)
sw_discovery_cancel(self, *oid);
@@ -943,7 +943,7 @@ static void service_resolver_callback(
oid_data* data = userdata;
sw_discovery_resolve_reply reply;
-
+
assert(r);
assert(data);
@@ -960,7 +960,7 @@ static void service_resolver_callback(
sw_ipv4_address_init_from_saddr(&addr, a->data.ipv4.address);
host_name = add_trailing_dot(host_name, host_name_fixed, sizeof(host_name_fixed));
-
+
if ((p = avahi_new0(uint8_t, (l = avahi_string_list_serialize(txt, NULL, 0))+1)))
avahi_string_list_serialize(txt, p, l);
@@ -973,7 +973,7 @@ static void service_resolver_callback(
case AVAHI_RESOLVER_FAILURE:
/* Apparently there is no way in HOWL to inform about failed resolvings ... */
-
+
avahi_warn("A service failed to resolve in the HOWL compatiblity layer of Avahi which is used by '%s'. "
"Since the HOWL API doesn't offer any means to inform the application about this, we have to ignore the failure. "
"Please fix your application to use the native API of Avahi!",
@@ -996,13 +996,13 @@ sw_result sw_discovery_resolve(
oid_data *data;
AvahiIfIndex ifindex;
sw_result result = SW_E_UNKNOWN;
-
+
assert(self);
assert(name);
assert(type);
assert(reply);
assert(oid);
-
+
AVAHI_WARN_LINKAGE;
if ((*oid = oid_alloc(self, OID_SERVICE_RESOLVER)) == (sw_discovery_oid) -1)
@@ -1012,22 +1012,22 @@ sw_result sw_discovery_resolve(
assert(data);
data->reply = (sw_result (*)(void)) reply;
data->extra = extra;
-
+
ifindex = interface_index == 0 ? AVAHI_IF_UNSPEC : (AvahiIfIndex) interface_index;
ASSERT_SUCCESS(pthread_mutex_lock(&self->mutex));
-
+
if (!(data->object = avahi_service_resolver_new(self->client, ifindex, AVAHI_PROTO_INET, name, type, domain, AVAHI_PROTO_INET, 0, service_resolver_callback, data))) {
result = map_error(avahi_client_errno(self->client));
goto finish;
}
result = SW_OKAY;
-
+
finish:
ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
-
+
if (result != SW_OKAY)
if (*oid != (sw_discovery_oid) -1)
sw_discovery_cancel(self, *oid);
@@ -1049,7 +1049,7 @@ static void service_browser_callback(
oid_data* data = userdata;
char type_fixed[AVAHI_DOMAIN_NAME_MAX], domain_fixed[AVAHI_DOMAIN_NAME_MAX];
sw_discovery_browse_reply reply;
-
+
assert(b);
assert(data);
@@ -1070,7 +1070,7 @@ static void service_browser_callback(
case AVAHI_BROWSER_FAILURE:
reply(data->discovery, OID_GET_INDEX(data), SW_DISCOVERY_BROWSE_INVALID, interface, name, type, domain, data->extra);
break;
-
+
case AVAHI_BROWSER_CACHE_EXHAUSTED:
case AVAHI_BROWSER_ALL_FOR_NOW:
break;
@@ -1089,12 +1089,12 @@ sw_result sw_discovery_browse(
oid_data *data;
AvahiIfIndex ifindex;
sw_result result = SW_E_UNKNOWN;
-
+
assert(self);
assert(type);
assert(reply);
assert(oid);
-
+
AVAHI_WARN_LINKAGE;
if ((*oid = oid_alloc(self, OID_SERVICE_BROWSER)) == (sw_discovery_oid) -1)
@@ -1104,22 +1104,22 @@ sw_result sw_discovery_browse(
assert(data);
data->reply = (sw_result (*)(void)) reply;
data->extra = extra;
-
+
ifindex = interface_index == 0 ? AVAHI_IF_UNSPEC : (AvahiIfIndex) interface_index;
ASSERT_SUCCESS(pthread_mutex_lock(&self->mutex));
-
+
if (!(data->object = avahi_service_browser_new(self->client, ifindex, AVAHI_PROTO_INET, type, domain, 0, service_browser_callback, data))) {
result = map_error(avahi_client_errno(self->client));
goto finish;
}
result = SW_OKAY;
-
+
finish:
ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
-
+
if (result != SW_OKAY)
if (*oid != (sw_discovery_oid) -1)
sw_discovery_cancel(self, *oid);
@@ -1129,7 +1129,7 @@ finish:
sw_result sw_discovery_cancel(sw_discovery self, sw_discovery_oid oid) {
oid_data *data;
- assert(self);
+ assert(self);
AVAHI_WARN_LINKAGE;
@@ -1141,19 +1141,19 @@ sw_result sw_discovery_cancel(sw_discovery self, sw_discovery_oid oid) {
case OID_SERVICE_BROWSER:
avahi_service_browser_free(data->object);
break;
-
+
case OID_SERVICE_RESOLVER:
avahi_service_resolver_free(data->object);
break;
-
+
case OID_DOMAIN_BROWSER:
avahi_domain_browser_free(data->object);
break;
-
+
case OID_ENTRY_GROUP:
avahi_entry_group_free(data->object);
break;
-
+
case OID_UNUSED:
;
}
@@ -1165,7 +1165,7 @@ sw_result sw_discovery_cancel(sw_discovery self, sw_discovery_oid oid) {
}
oid_release(self, oid);
-
+
return SW_OKAY;
}
diff --git a/avahi-compat-howl/include/corby/buffer.h b/avahi-compat-howl/include/corby/buffer.h
index 017ad5d..3c4416e 100644
--- a/avahi-compat-howl/include/corby/buffer.h
+++ b/avahi-compat-howl/include/corby/buffer.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -36,7 +36,7 @@
#ifdef __cplusplus
extern "C"
{
-#endif
+#endif
struct _sw_corby_buffer;
@@ -128,7 +128,7 @@ sw_corby_buffer_fina(
void HOWL_API
sw_corby_buffer_reset(
sw_corby_buffer self);
-
+
sw_result HOWL_API
sw_corby_buffer_set_octets(
@@ -136,21 +136,21 @@ sw_corby_buffer_set_octets(
sw_octets octets,
sw_size_t size);
-
+
sw_octets HOWL_API
sw_corby_buffer_octets(
sw_corby_buffer self);
-
-
+
+
sw_size_t HOWL_API
sw_corby_buffer_bytes_used(
sw_corby_buffer self);
-
+
sw_size_t HOWL_API
sw_corby_buffer_size(
sw_corby_buffer self);
-
+
sw_result HOWL_API
sw_corby_buffer_put_int8(
@@ -193,14 +193,14 @@ sw_corby_buffer_put_octets(
sw_corby_buffer self,
sw_const_octets val,
sw_size_t size);
-
+
sw_result HOWL_API
sw_corby_buffer_put_sized_octets(
sw_corby_buffer self,
sw_const_octets val,
sw_uint32 len);
-
+
sw_result HOWL_API
sw_corby_buffer_put_cstring(
@@ -218,7 +218,7 @@ sw_result HOWL_API
sw_corby_buffer_put_pad(
sw_corby_buffer self,
sw_corby_buffer_pad pad);
-
+
sw_result HOWL_API
sw_corby_buffer_get_int8(
@@ -273,7 +273,7 @@ sw_corby_buffer_allocate_and_get_sized_octets(
sw_octets * val,
sw_uint32 * size,
sw_uint8 endian);
-
+
sw_result HOWL_API
sw_corby_buffer_get_zerocopy_sized_octets(
@@ -281,7 +281,7 @@ sw_corby_buffer_get_zerocopy_sized_octets(
sw_octets * val,
sw_uint32 * size,
sw_uint8 endian);
-
+
sw_result HOWL_API
sw_corby_buffer_get_sized_octets(
@@ -297,15 +297,15 @@ sw_corby_buffer_allocate_and_get_cstring(
sw_string * val,
sw_uint32 * len,
sw_uint8 endian);
-
-
+
+
sw_result HOWL_API
sw_corby_buffer_get_zerocopy_cstring(
sw_corby_buffer self,
sw_string * val,
sw_uint32 * len,
sw_uint8 endian);
-
+
sw_result HOWL_API
sw_corby_buffer_get_cstring(
@@ -313,18 +313,18 @@ sw_corby_buffer_get_cstring(
sw_string val,
sw_uint32 * len,
sw_uint8 endian);
-
-
+
+
sw_result HOWL_API
sw_corby_buffer_get_object(
sw_corby_buffer self,
struct _sw_corby_object ** object,
sw_uint8 endian);
-
+
#ifdef __cplusplus
}
-#endif
+#endif
#endif
diff --git a/avahi-compat-howl/include/corby/channel.h b/avahi-compat-howl/include/corby/channel.h
index 823e027..9c91fbb 100644
--- a/avahi-compat-howl/include/corby/channel.h
+++ b/avahi-compat-howl/include/corby/channel.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -38,7 +38,7 @@
#ifdef __cplusplus
extern "C"
{
-#endif
+#endif
struct _sw_corby_channel;
typedef struct _sw_corby_channel * sw_corby_channel;
@@ -180,7 +180,7 @@ sw_corby_channel_fina(
#ifdef __cplusplus
}
-#endif
+#endif
#endif
diff --git a/avahi-compat-howl/include/corby/corby.h b/avahi-compat-howl/include/corby/corby.h
index 7d68138..5e069ff 100644
--- a/avahi-compat-howl/include/corby/corby.h
+++ b/avahi-compat-howl/include/corby/corby.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -38,9 +38,9 @@
/*
- * protocol tags. the only standard one is TAG_INTERNET_IIOP.
+ * protocol tags. the only standard one is TAG_INTERNET_IIOP.
* the others are proprietary pandora corby protocols.
- */
+ */
#define SW_TAG_INTERNET_IOP 0
#define SW_TAG_UIOP 250
#define SW_TAG_MIOP 251
diff --git a/avahi-compat-howl/include/corby/message.h b/avahi-compat-howl/include/corby/message.h
index 406b9b9..a06c358 100644
--- a/avahi-compat-howl/include/corby/message.h
+++ b/avahi-compat-howl/include/corby/message.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -54,7 +54,7 @@ sw_corby_message_fina(
#ifdef __cplusplus
}
-#endif
+#endif
#endif
diff --git a/avahi-compat-howl/include/corby/object.h b/avahi-compat-howl/include/corby/object.h
index 1bc7407..1cfd516 100644
--- a/avahi-compat-howl/include/corby/object.h
+++ b/avahi-compat-howl/include/corby/object.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -64,7 +64,7 @@ sw_corby_object_init_from_url(
sw_result HOWL_API
sw_corby_object_fina(
sw_corby_object self);
-
+
sw_result HOWL_API
sw_corby_object_start_request(
diff --git a/avahi-compat-howl/include/corby/orb.h b/avahi-compat-howl/include/corby/orb.h
index a674082..76af578 100644
--- a/avahi-compat-howl/include/corby/orb.h
+++ b/avahi-compat-howl/include/corby/orb.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -38,7 +38,7 @@
#ifdef __cplusplus
extern "C"
{
-#endif
+#endif
struct _sw_corby_orb;
@@ -165,7 +165,7 @@ sw_corby_orb_protocol_to_address(
sw_const_string tag,
sw_string addr,
sw_port * port);
-
+
sw_result HOWL_API
sw_corby_orb_protocol_to_url(
@@ -193,7 +193,7 @@ sw_corby_orb_dispatch_message(
#ifdef __cplusplus
}
-#endif
+#endif
#endif
diff --git a/avahi-compat-howl/include/discovery/discovery.h b/avahi-compat-howl/include/discovery/discovery.h
index 1e8a7d5..082373d 100644
--- a/avahi-compat-howl/include/discovery/discovery.h
+++ b/avahi-compat-howl/include/discovery/discovery.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -52,7 +52,7 @@ typedef sw_uint32 sw_discovery_oid;
/*
* For backwards compatibility
*/
-#define sw_discovery_publish_host_id sw_discovery_oid
+#define sw_discovery_publish_host_id sw_discovery_oid
#define sw_discovery_publish_id sw_discovery_oid
#define sw_discovery_browse_id sw_discovery_oid
#define sw_discovery_resolve_id sw_discovery_oid
@@ -107,7 +107,7 @@ typedef sw_result
sw_discovery_publish_status status,
sw_opaque extra);
-typedef sw_result
+typedef sw_result
(HOWL_API *sw_discovery_browse_reply)(
sw_discovery session,
sw_discovery_oid oid,
@@ -142,10 +142,10 @@ typedef sw_result
sw_const_string fullname,
sw_uint16 rrtype,
sw_uint16 rrclass,
- sw_uint16 rrdatalen,
+ sw_uint16 rrdatalen,
sw_const_octets rrdata,
sw_uint32 ttl,
- sw_opaque extra);
+ sw_opaque extra);
/*
@@ -254,7 +254,7 @@ sw_discovery_query_record(
sw_const_string fullname,
sw_uint16 rrtype,
sw_uint16 rrclass,
- sw_discovery_query_record_reply reply,
+ sw_discovery_query_record_reply reply,
sw_opaque extra,
sw_discovery_oid * oid);
@@ -263,7 +263,7 @@ sw_result HOWL_API
sw_discovery_cancel(
sw_discovery self,
sw_discovery_oid oid);
-
+
/* ----------------------------------------------------------
@@ -272,7 +272,7 @@ sw_discovery_cancel(
*
* ----------------------------------------------------------
*/
-
+
sw_result HOWL_API
sw_discovery_run(
@@ -282,7 +282,7 @@ sw_discovery_run(
sw_result HOWL_API
sw_discovery_stop_run(
sw_discovery self);
-
+
int HOWL_API
sw_discovery_socket(
diff --git a/avahi-compat-howl/include/discovery/text_record.h b/avahi-compat-howl/include/discovery/text_record.h
index 91f16d7..a5ee802 100644
--- a/avahi-compat-howl/include/discovery/text_record.h
+++ b/avahi-compat-howl/include/discovery/text_record.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
diff --git a/avahi-compat-howl/include/howl.h b/avahi-compat-howl/include/howl.h
index 80a1775..dac6d43 100644
--- a/avahi-compat-howl/include/howl.h
+++ b/avahi-compat-howl/include/howl.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
diff --git a/avahi-compat-howl/include/rendezvous/rendezvous.h b/avahi-compat-howl/include/rendezvous/rendezvous.h
index 1d26b4a..12c85e8 100644
--- a/avahi-compat-howl/include/rendezvous/rendezvous.h
+++ b/avahi-compat-howl/include/rendezvous/rendezvous.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
diff --git a/avahi-compat-howl/include/rendezvous/text_record.h b/avahi-compat-howl/include/rendezvous/text_record.h
index cf8b845..3e2bfc2 100644
--- a/avahi-compat-howl/include/rendezvous/text_record.h
+++ b/avahi-compat-howl/include/rendezvous/text_record.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
diff --git a/avahi-compat-howl/include/salt/address.h b/avahi-compat-howl/include/salt/address.h
index b18a4af..ea83f8d 100644
--- a/avahi-compat-howl/include/salt/address.h
+++ b/avahi-compat-howl/include/salt/address.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -91,7 +91,7 @@ sw_ipv4_address_fina(
sw_bool HOWL_API
sw_ipv4_address_is_any(
sw_ipv4_address self);
-
+
sw_saddr HOWL_API
sw_ipv4_address_saddr(
diff --git a/avahi-compat-howl/include/salt/debug.h b/avahi-compat-howl/include/salt/debug.h
index 03bd453..c53977b 100644
--- a/avahi-compat-howl/include/salt/debug.h
+++ b/avahi-compat-howl/include/salt/debug.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -36,7 +36,7 @@
#ifdef __cplusplus
extern "C"
{
-#endif
+#endif
#define SW_LOG_WARNING 1 << 0
diff --git a/avahi-compat-howl/include/salt/interface.h b/avahi-compat-howl/include/salt/interface.h
index 5356398..a4b1b1d 100644
--- a/avahi-compat-howl/include/salt/interface.h
+++ b/avahi-compat-howl/include/salt/interface.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
diff --git a/avahi-compat-howl/include/salt/platform.h b/avahi-compat-howl/include/salt/platform.h
index fda0c77..6bb9dcc 100644
--- a/avahi-compat-howl/include/salt/platform.h
+++ b/avahi-compat-howl/include/salt/platform.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -33,7 +33,7 @@
#ifdef __cplusplus
extern "C"
{
-#endif
+#endif
#if defined(__VXWORKS__)
@@ -119,7 +119,7 @@ typedef int sw_result;
* for little endian platforms.
*
* The macro WORDS_BIGENDIAN will be defined
- * by autoconf. If you are using Howl on
+ * by autoconf. If you are using Howl on
* a platform that doesn't have autoconf, define
* SW_ENDIAN directly
* --------------------------------------------------------
@@ -185,19 +185,19 @@ extern sw_int32
sw_strcasecmp(
sw_const_string arg1,
sw_const_string arg2);
-
+
extern sw_int32
sw_strncasecmp(
sw_const_string arg1,
sw_const_string arg2,
sw_len n);
-
+
extern sw_string
sw_strtok_r(
sw_string arg1,
sw_const_string arg2,
sw_string * lasts);
-
+
# define sw_memset(ARG1, ARG2, ARG3) memset((char*) ARG1, ARG2, ARG3)
# define sw_memcpy(ARG1, ARG2, ARG3) memcpy((char*) ARG1, (char*) ARG2, ARG3)
# define sw_memcmp(ARG1, ARG2, ARG3) memcmp((char*) ARG1, ARG2, ARG3)
@@ -413,7 +413,7 @@ sw_strerror();
/*
* Obsolete types and macros.
- *
+ *
* These are here for backwards compatibility, but will
* be removed in the future
*/
diff --git a/avahi-compat-howl/include/salt/salt.h b/avahi-compat-howl/include/salt/salt.h
index 88ac0d9..ddb289b 100644
--- a/avahi-compat-howl/include/salt/salt.h
+++ b/avahi-compat-howl/include/salt/salt.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -36,14 +36,14 @@
#ifdef __cplusplus
extern "C"
{
-#endif
+#endif
typedef enum _sw_socket_event
{
SW_SOCKET_READ = (1 << 0),
SW_SOCKET_WRITE = (1 << 1),
- SW_SOCKET_OOB = (1 << 2)
+ SW_SOCKET_OOB = (1 << 2)
} sw_socket_event;
@@ -80,7 +80,7 @@ typedef sw_result
sw_salt salt,
struct _sw_network_interface * netif,
sw_opaque extra);
-
+
typedef sw_opaque sw_signal_handler;
typedef sw_result
(HOWL_API *sw_signal_handler_func)(
@@ -95,13 +95,13 @@ sw_salt_init(
sw_salt * self,
int argc,
char ** argv);
-
-
+
+
sw_result HOWL_API
sw_salt_fina(
sw_salt self);
-
+
sw_result HOWL_API
sw_salt_register_socket(
sw_salt self,
@@ -116,8 +116,8 @@ sw_result HOWL_API
sw_salt_unregister_socket(
sw_salt self,
struct _sw_socket * socket);
-
-
+
+
sw_result HOWL_API
sw_salt_register_timer(
sw_salt self,
@@ -126,8 +126,8 @@ sw_salt_register_timer(
sw_timer_handler handler,
sw_timer_handler_func func,
sw_opaque extra);
-
-
+
+
sw_result HOWL_API
sw_salt_unregister_timer(
sw_salt self,
@@ -187,7 +187,7 @@ sw_salt_run(
sw_result HOWL_API
sw_salt_stop_run(
sw_salt self);
-
+
#define SW_FALSE 0
#define SW_TRUE 1
diff --git a/avahi-compat-howl/include/salt/signal.h b/avahi-compat-howl/include/salt/signal.h
index 2ae5bb3..b36e02f 100644
--- a/avahi-compat-howl/include/salt/signal.h
+++ b/avahi-compat-howl/include/salt/signal.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -35,7 +35,7 @@
#ifdef __cplusplus
extern "C"
{
-#endif
+#endif
struct _sw_signal;
@@ -55,7 +55,7 @@ sw_signal_fina(
#ifdef __cplusplus
}
-#endif
+#endif
#endif
diff --git a/avahi-compat-howl/include/salt/socket.h b/avahi-compat-howl/include/salt/socket.h
index 88773e4..9eaa102 100644
--- a/avahi-compat-howl/include/salt/socket.h
+++ b/avahi-compat-howl/include/salt/socket.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -36,7 +36,7 @@
#ifdef __cplusplus
extern "C"
{
-#endif
+#endif
struct _sw_socket;
@@ -66,8 +66,8 @@ sw_udp_socket_init(
sw_result HOWL_API
sw_multicast_socket_init(
sw_socket * self);
-
-
+
+
sw_result HOWL_API
sw_socket_fina(
sw_socket self);
@@ -97,21 +97,21 @@ sw_result HOWL_API
sw_socket_listen(
sw_socket self,
int qsize);
-
-
+
+
sw_result HOWL_API
sw_socket_connect(
sw_socket self,
sw_ipv4_address address,
sw_port port);
-
-
+
+
sw_result HOWL_API
sw_socket_accept(
sw_socket self,
sw_socket * socket);
-
-
+
+
sw_result HOWL_API
sw_socket_send(
sw_socket self,
@@ -129,7 +129,7 @@ sw_socket_sendto(
sw_ipv4_address to,
sw_port port);
-
+
sw_result HOWL_API
sw_socket_recv(
sw_socket self,
@@ -154,13 +154,13 @@ sw_result HOWL_API
sw_socket_set_blocking_mode(
sw_socket self,
sw_bool blocking_mode);
-
-
+
+
sw_result HOWL_API
sw_socket_set_options(
sw_socket self,
sw_socket_options options);
-
+
sw_ipv4_address HOWL_API
sw_socket_ipv4_address(
@@ -185,31 +185,31 @@ sw_socket_close(
sw_result HOWL_API
sw_socket_options_init(
sw_socket_options * self);
-
+
sw_result HOWL_API
sw_socket_options_fina(
sw_socket_options self);
-
+
sw_result HOWL_API
sw_socket_options_set_debug(
sw_socket_options self,
sw_bool val);
-
+
sw_result HOWL_API
sw_socket_options_set_nodelay(
sw_socket_options self,
sw_bool val);
-
-
+
+
sw_result HOWL_API
sw_socket_options_set_dontroute(
sw_socket_options self,
sw_bool val);
-
-
+
+
sw_result HOWL_API
sw_socket_options_set_keepalive(
sw_socket_options self,
@@ -221,8 +221,8 @@ sw_socket_options_set_linger(
sw_socket_options self,
sw_bool onoff,
sw_uint32 linger);
-
-
+
+
sw_result HOWL_API
sw_socket_options_set_reuseaddr(
sw_socket_options self,
@@ -233,8 +233,8 @@ sw_result HOWL_API
sw_socket_options_set_rcvbuf(
sw_socket_options self,
sw_uint32 val);
-
-
+
+
sw_result HOWL_API
sw_socket_options_set_sndbuf(
sw_socket_options self,
@@ -242,7 +242,7 @@ sw_socket_options_set_sndbuf(
int
-sw_socket_error_code(void);
+sw_socket_error_code(void);
#define SW_E_SOCKET_BASE 0x80000200
@@ -257,7 +257,7 @@ sw_socket_error_code(void);
#ifdef __cplusplus
}
-#endif
+#endif
#endif
diff --git a/avahi-compat-howl/include/salt/time.h b/avahi-compat-howl/include/salt/time.h
index b3ec226..8789b3a 100644
--- a/avahi-compat-howl/include/salt/time.h
+++ b/avahi-compat-howl/include/salt/time.h
@@ -8,7 +8,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -35,7 +35,7 @@
#ifdef __cplusplus
extern "C"
{
-#endif
+#endif
struct _sw_timer;
@@ -94,7 +94,7 @@ sw_time_cmp(
#ifdef __cplusplus
}
-#endif
+#endif
#endif
diff --git a/avahi-compat-howl/samples/browse.c b/avahi-compat-howl/samples/browse.c
index b4a8cf3..f55b1cf 100644
--- a/avahi-compat-howl/samples/browse.c
+++ b/avahi-compat-howl/samples/browse.c
@@ -5,7 +5,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -54,7 +54,7 @@ my_resolver(
sw_result err = SW_OKAY;
sw_discovery_cancel(discovery, oid);
-
+
fprintf(stderr, "resolve reply: 0x%x %s %s %s %s %d\n", interface_index, name, type, domain, sw_ipv4_address_name(address, name_buf, 16), port);
if ((text_record_len > 0) && (text_record) && (*text_record != '\0'))
diff --git a/avahi-compat-howl/samples/publish.c b/avahi-compat-howl/samples/publish.c
index cca6040..931e786 100644
--- a/avahi-compat-howl/samples/publish.c
+++ b/avahi-compat-howl/samples/publish.c
@@ -5,7 +5,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
diff --git a/avahi-compat-howl/samples/query.c b/avahi-compat-howl/samples/query.c
index a74a81c..b1c30eb 100644
--- a/avahi-compat-howl/samples/query.c
+++ b/avahi-compat-howl/samples/query.c
@@ -5,7 +5,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -40,7 +40,7 @@ query_record_reply(
sw_const_string fullname,
sw_uint16 rrtype,
sw_uint16 rrclass,
- sw_uint16 rrdatalen,
+ sw_uint16 rrdatalen,
sw_const_octets rrdata,
sw_uint32 ttl,
sw_opaque extra)
diff --git a/avahi-compat-howl/samples/resolve.c b/avahi-compat-howl/samples/resolve.c
index b921c27..1790849 100644
--- a/avahi-compat-howl/samples/resolve.c
+++ b/avahi-compat-howl/samples/resolve.c
@@ -5,7 +5,7 @@
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
@@ -54,7 +54,7 @@ my_resolver(
sw_result err = SW_OKAY;
sw_discovery_cancel(discovery, oid);
-
+
fprintf(stderr, "resolve reply: 0x%x %s %s %s %s %d\n", interface_index, name, type, domain, sw_ipv4_address_name(address, name_buf, 16), port);
if ((text_record_len > 0) && (text_record) && (*text_record != '\0'))
diff --git a/avahi-compat-howl/text-test.c b/avahi-compat-howl/text-test.c
index fea653c..e0d6f2c 100644
--- a/avahi-compat-howl/text-test.c
+++ b/avahi-compat-howl/text-test.c
@@ -2,17 +2,17 @@
/***
This file is part of avahi.
-
+
avahi is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
-
+
avahi is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public
License along with avahi; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -72,7 +72,7 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
char key[255];
uint8_t val[255];
sw_ulong val_len;
-
+
ASSERT_SW_OKAY(sw_text_record_init(&r));
ASSERT_SW_OKAY(sw_text_record_add_string(r, "foo=bar"));
ASSERT_SW_OKAY(sw_text_record_add_string(r, "waldo=baz"));
@@ -92,7 +92,7 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
-
+
ASSERT_SW_OKAY(sw_text_record_fina(r));
return 0;
diff --git a/avahi-compat-howl/text.c b/avahi-compat-howl/text.c
index 3b717be..178ca73 100644
--- a/avahi-compat-howl/text.c
+++ b/avahi-compat-howl/text.c
@@ -2,17 +2,17 @@
/***
This file is part of avahi.
-
+
avahi is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
-
+
avahi is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public
License along with avahi; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -44,12 +44,12 @@ struct _sw_text_record {
static size_t strlcpy(char *dest, const char *src, size_t n) {
assert(dest);
assert(src);
-
+
if (n > 0) {
strncpy(dest, src, n-1);
dest[n-1] = 0;
}
-
+
return strlen(src);
}
@@ -59,17 +59,17 @@ sw_result sw_text_record_init(sw_text_record *self) {
assert(self);
AVAHI_WARN_LINKAGE;
-
+
if (!(*self = avahi_new(struct _sw_text_record, 1))) {
*self = NULL;
return SW_E_UNKNOWN;
}
-
+
(*self)->strlst = NULL;
(*self)->buffer = NULL;
(*self)->buffer_size = 0;
(*self)->buffer_valid = 0;
-
+
return SW_OKAY;
}
@@ -89,12 +89,12 @@ sw_result sw_text_record_add_string(
sw_const_string string) {
AvahiStringList *n;
-
+
assert(self);
assert(string);
AVAHI_WARN_LINKAGE;
-
+
if (!(n = avahi_string_list_add(self->strlst, string)))
return SW_E_UNKNOWN;
@@ -112,7 +112,7 @@ sw_result sw_text_record_add_key_and_string_value(
assert(self);
assert(key);
-
+
AVAHI_WARN_LINKAGE;
if (!(n = avahi_string_list_add_pair(self->strlst, key, val)))
@@ -134,7 +134,7 @@ sw_result sw_text_record_add_key_and_binary_value(
assert(self);
assert(key);
assert(len || !val);
-
+
AVAHI_WARN_LINKAGE;
if (!(n = avahi_string_list_add_pair_arbitrary(self->strlst, key, val, len)))
@@ -152,10 +152,10 @@ static int rebuild(sw_text_record self) {
return 0;
self->buffer_size = avahi_string_list_serialize(self->strlst, NULL, 0);
-
+
if (!(self->buffer = avahi_realloc(self->buffer, self->buffer_size + 1)))
return -1;
-
+
avahi_string_list_serialize(self->strlst, self->buffer, self->buffer_size);
self->buffer_valid = 1;
@@ -177,7 +177,7 @@ sw_uint32 sw_text_record_len(sw_text_record self) {
assert(self);
AVAHI_WARN_LINKAGE;
-
+
if (rebuild(self) < 0)
return (uint32_t) -1;
@@ -186,7 +186,7 @@ sw_uint32 sw_text_record_len(sw_text_record self) {
struct _sw_text_record_iterator {
AvahiStringList *strlst, *index;
-
+
};
sw_result sw_text_record_iterator_init(
@@ -198,7 +198,7 @@ sw_result sw_text_record_iterator_init(
assert(self);
AVAHI_WARN_LINKAGE;
-
+
if (!(*self = avahi_new(struct _sw_text_record_iterator, 1))) {
*self = NULL;
return SW_E_UNKNOWN;
@@ -211,7 +211,7 @@ sw_result sw_text_record_iterator_init(
}
(*self)->index = (*self)->strlst = avahi_string_list_reverse(txt);
-
+
return SW_OKAY;
}
@@ -222,7 +222,7 @@ sw_result sw_text_record_iterator_fina(sw_text_record_iterator self) {
avahi_string_list_free(self->strlst);
avahi_free(self);
-
+
return SW_OKAY;
}
@@ -234,10 +234,10 @@ sw_result sw_text_record_iterator_next(
char *mkey = NULL, *mvalue = NULL;
size_t msize = 0;
-
+
assert(self);
assert(key);
-
+
AVAHI_WARN_LINKAGE;
if (!self->index)
@@ -250,7 +250,7 @@ sw_result sw_text_record_iterator_next(
memset(val, 0, SW_TEXT_RECORD_MAX_LEN);
memcpy(val, mvalue, msize);
*val_len = msize;
-
+
avahi_free(mkey);
avahi_free(mvalue);
diff --git a/avahi-compat-howl/unsupported.c b/avahi-compat-howl/unsupported.c
index 800b3c3..ba9fc3b 100644
--- a/avahi-compat-howl/unsupported.c
+++ b/avahi-compat-howl/unsupported.c
@@ -2,17 +2,17 @@
/***
This file is part of avahi.
-
+
avahi is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
-
+
avahi is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public
License along with avahi; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -97,14 +97,14 @@ sw_time sw_time_add(
AVAHI_WARN_UNSUPPORTED_ABORT;
}
-AVAHI_GCC_NORETURN
+AVAHI_GCC_NORETURN
sw_time sw_time_sub(
AVAHI_GCC_UNUSED sw_time self,
AVAHI_GCC_UNUSED sw_time y) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
-AVAHI_GCC_NORETURN
+AVAHI_GCC_NORETURN
sw_int32 sw_time_cmp(
AVAHI_GCC_UNUSED sw_time self,
AVAHI_GCC_UNUSED sw_time y) {
@@ -338,17 +338,17 @@ sw_result sw_socket_set_options(
return SW_E_NO_IMPL;
}
-AVAHI_GCC_NORETURN
+AVAHI_GCC_NORETURN
sw_ipv4_address sw_socket_ipv4_address(AVAHI_GCC_UNUSED sw_socket self) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
-AVAHI_GCC_NORETURN
+AVAHI_GCC_NORETURN
sw_port sw_socket_port(AVAHI_GCC_UNUSED sw_socket self) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
-AVAHI_GCC_NORETURN
+AVAHI_GCC_NORETURN
sw_sockdesc_t sw_socket_desc(AVAHI_GCC_UNUSED sw_socket self) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
@@ -425,7 +425,7 @@ sw_result sw_socket_options_set_sndbuf(
return SW_E_NO_IMPL;
}
-AVAHI_GCC_NORETURN
+AVAHI_GCC_NORETURN
int sw_socket_error_code(void) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
@@ -478,7 +478,7 @@ sw_result sw_corby_orb_register_channel(
return SW_E_NO_IMPL;
}
-AVAHI_GCC_NORETURN
+AVAHI_GCC_NORETURN
sw_corby_orb_delegate sw_corby_orb_get_delegate(AVAHI_GCC_UNUSED sw_corby_orb self) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
@@ -581,7 +581,7 @@ sw_result sw_corby_buffer_init_with_size_and_delegate(
sw_result sw_corby_buffer_fina(AVAHI_GCC_UNUSED sw_corby_buffer self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
-}
+}
void sw_corby_buffer_reset(AVAHI_GCC_UNUSED sw_corby_buffer self) {
AVAHI_WARN_UNSUPPORTED;
@@ -667,7 +667,7 @@ sw_result sw_corby_buffer_put_sized_octets(
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-
+
sw_result sw_corby_buffer_put_cstring(
AVAHI_GCC_UNUSED sw_corby_buffer self,
AVAHI_GCC_UNUSED sw_const_string val) {
@@ -710,7 +710,7 @@ sw_result sw_corby_buffer_get_int16(
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-
+
sw_result sw_corby_buffer_get_uint16(
AVAHI_GCC_UNUSED sw_corby_buffer self,
AVAHI_GCC_UNUSED sw_uint16 * val,
@@ -718,7 +718,7 @@ sw_result sw_corby_buffer_get_uint16(
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-
+
sw_result sw_corby_buffer_get_int32(
AVAHI_GCC_UNUSED sw_corby_buffer self,
AVAHI_GCC_UNUSED sw_int32 * val,
@@ -815,7 +815,7 @@ sw_result sw_corby_channel_start_request(
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-
+
sw_result sw_corby_channel_start_reply(
AVAHI_GCC_UNUSED sw_corby_channel self,
AVAHI_GCC_UNUSED struct _sw_corby_buffer ** buffer,
@@ -879,9 +879,9 @@ sw_result sw_corby_channel_set_delegate(
AVAHI_GCC_UNUSED sw_corby_channel_delegate delegate) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
-}
+}
-AVAHI_GCC_NORETURN
+AVAHI_GCC_NORETURN
sw_corby_channel_delegate sw_corby_channel_get_delegate(
AVAHI_GCC_UNUSED sw_corby_channel self) {
AVAHI_WARN_UNSUPPORTED_ABORT;
@@ -893,7 +893,7 @@ void sw_corby_channel_set_app_data(
AVAHI_WARN_UNSUPPORTED;
}
-AVAHI_GCC_NORETURN
+AVAHI_GCC_NORETURN
sw_opaque sw_corby_channel_get_app_data(AVAHI_GCC_UNUSED sw_corby_channel self) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
@@ -938,7 +938,7 @@ sw_result sw_corby_object_send(
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-
+
sw_result sw_corby_object_recv(
AVAHI_GCC_UNUSED sw_corby_object self,
AVAHI_GCC_UNUSED sw_corby_message * message,
@@ -1010,7 +1010,7 @@ sw_result sw_text_record_string_iterator_fina(
AVAHI_GCC_UNUSED sw_text_record_string_iterator self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
-}
+}
sw_result sw_text_record_string_iterator_next(
AVAHI_GCC_UNUSED sw_text_record_string_iterator self,
diff --git a/avahi-compat-howl/warn.c b/avahi-compat-howl/warn.c
index 4bff7ee..6e1715f 100644
--- a/avahi-compat-howl/warn.c
+++ b/avahi-compat-howl/warn.c
@@ -2,17 +2,17 @@
/***
This file is part of avahi.
-
+
avahi is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
-
+
avahi is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public
License along with avahi; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
diff --git a/avahi-compat-howl/warn.h b/avahi-compat-howl/warn.h
index 785dba4..2e30eaf 100644
--- a/avahi-compat-howl/warn.h
+++ b/avahi-compat-howl/warn.h
@@ -5,17 +5,17 @@
/***
This file is part of avahi.
-
+
avahi is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
-
+
avahi is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public
License along with avahi; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307