Skip to content

Commit

Permalink
Merge pull request #222 from warmsocks/master
Browse files Browse the repository at this point in the history
Correct spelling mistakes found by codespell.  Fixes lathiat/avahi #167
  • Loading branch information
pemensik committed Apr 21, 2023
2 parents edf39cd + f21e02c commit a0cb004
Show file tree
Hide file tree
Showing 45 changed files with 105 additions and 102 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AVAHI SERVICE DISCOVERY SUITE

Avahi is a free, LGPL implementation of DNS Service Discovery (DNS-SD RFC 6763) over Multicast DNS (mDNS RFC 6762),
commonly known as and compatible with Apple Bonjour primarily targetting Linux.
commonly known as and compatible with Apple Bonjour primarily targeting Linux.

Copyright 2004-2022 by the Avahi developers.

Expand Down
2 changes: 1 addition & 1 deletion avahi-autoipd/avahi-autoipd.action.bsd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ set -e
# UNBIND: The IP address is no longer needed
# STOP: The daemon is terminating
# $2 interface name
# $3 IP adddress
# $3 IP address

# We have the BSD ifconfig tool

Expand Down
2 changes: 1 addition & 1 deletion avahi-autoipd/avahi-autoipd.action.linux
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ set -e
# UNBIND: The IP address is no longer needed
# STOP: The daemon is terminating
# $2 interface name
# $3 IP adddress
# $3 IP address

PATH="$PATH:/usr/bin:/usr/sbin:/bin:/sbin"

Expand Down
10 changes: 5 additions & 5 deletions avahi-client/client-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static void avahi_host_name_resolver_callback (
ar = avahi_address_resolver_new(client, interface, protocol, a, 0, avahi_address_resolver_callback, (char*) "omghai6u");
if (ar)
{
printf ("Succesfully created address resolver object\n");
printf ("Successfully created address resolver object\n");
} else {
printf ("Failed to create AddressResolver\n");
}
Expand Down Expand Up @@ -253,7 +253,7 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {

assert(group);

printf("Sucessfully created entry group %p\n", (void*) group);
printf("Successfully created entry group %p\n", (void*) group);

printf("%s\n", avahi_strerror(avahi_entry_group_add_service (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar", NULL)));
printf("add_record: %d\n", avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "\5booya", 6));
Expand All @@ -265,19 +265,19 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
if (domain == NULL)
printf ("Failed to create domain browser object\n");
else
printf ("Sucessfully created domain browser %p\n", (void*) domain);
printf ("Successfully created domain browser %p\n", (void*) domain);

st = avahi_service_type_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, 0, avahi_service_type_browser_callback, (char*) "omghai3u");
if (st == NULL)
printf ("Failed to create service type browser object\n");
else
printf ("Sucessfully created service type browser %p\n", (void*) st);
printf ("Successfully created service type browser %p\n", (void*) st);

sb = avahi_service_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_http._tcp", NULL, 0, avahi_service_browser_callback, (char*) "omghai3u");
if (sb == NULL)
printf ("Failed to create service browser object\n");
else
printf ("Sucessfully created service browser %p\n", (void*) sb);
printf ("Successfully created service browser %p\n", (void*) sb);

hnr = avahi_host_name_resolver_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "ecstasy.local", AVAHI_PROTO_UNSPEC, 0, avahi_host_name_resolver_callback, (char*) "omghai4u");
if (hnr == NULL)
Expand Down
4 changes: 2 additions & 2 deletions avahi-client/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static DBusHandlerResult filter_func(DBusConnection *bus, DBusMessage *message,
avahi_client_is_connected(client)) {

/* Regardless if the server lost its name or
* if the name was transfered: our services are no longer
* if the name was transferred: our services are no longer
* available, so we disconnect ourselves */
avahi_client_set_errno(client, AVAHI_ERR_DISCONNECTED);
goto fail;
Expand Down Expand Up @@ -580,7 +580,7 @@ AvahiClient *avahi_client_new(const AvahiPoll *poll_api, AvahiClientFlags flags,
}

/* The user doesn't want this call to fail if the daemon is not
* available, so let's return succesfully */
* available, so let's return successfully */
client_set_state(client, AVAHI_CLIENT_CONNECTING);

} else {
Expand Down
4 changes: 2 additions & 2 deletions avahi-client/lookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ typedef void (*AvahiServiceBrowserCallback) (
* the same service data is dropped because redundant). If you want to
* subscribe to service data changes, you should use
* avahi_service_resolver_new() and keep it open, in which case you
* will be notified via AVAHI_RESOLVE_FOUND everytime the service data
* will be notified via AVAHI_RESOLVE_FOUND every time the service data
* changes. */
AvahiServiceBrowser* avahi_service_browser_new (
AvahiClient *client,
Expand Down Expand Up @@ -176,7 +176,7 @@ typedef void (*AvahiServiceResolverCallback) (
* service data you received via avahi_service_browser_new()'s callback
* function, especially interface and protocol. The protocol argument specifies
* the protocol (IPv4 or IPv6) to use as transport for the queries which are
* sent out by this resolver. The aprotocol argument specifies the adress
* sent out by this resolver. The aprotocol argument specifies the address
* family (IPv4 or IPv6) of the address of the service we are looking for.
* Generally, on "protocol" you should only pass what was supplied to you as
* parameter to your AvahiServiceBrowserCallback. In "aprotocol" you should
Expand Down
4 changes: 2 additions & 2 deletions avahi-client/publish.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ typedef void (*AvahiEntryGroupCallback) (
AvahiEntryGroup* avahi_entry_group_new(
AvahiClient* c,
AvahiEntryGroupCallback callback /**< This callback is called whenever the state of this entry group changes. May not be NULL. Please note that this function is called for the first time from within the avahi_entry_group_new() context! Thus, in the callback you should not make use of global variables that are initialized only after your call to avahi_entry_group_new(). A common mistake is to store the AvahiEntryGroup pointer returned by avahi_entry_group_new() in a global variable and assume that this global variable already contains the valid pointer when the callback is called for the first time. A work-around for this is to always use the AvahiEntryGroup pointer passed to the callback function instead of the global pointer. */,
void *userdata /**< This arbitrary user data pointer will be passed to the callback functon */);
void *userdata /**< This arbitrary user data pointer will be passed to the callback function */);

/** Clean up and free an AvahiEntryGroup object */
int avahi_entry_group_free (AvahiEntryGroup *);
Expand All @@ -63,7 +63,7 @@ int avahi_entry_group_free (AvahiEntryGroup *);

/** @{ \name State */

/** Commit an AvahiEntryGroup. The entries in the entry group are now registered on the network. Commiting empty entry groups is considered an error. */
/** Commit an AvahiEntryGroup. The entries in the entry group are now registered on the network. Committing empty entry groups is considered an error. */
int avahi_entry_group_commit (AvahiEntryGroup*);

/** Reset an AvahiEntryGroup. This takes effect immediately. */
Expand Down
14 changes: 7 additions & 7 deletions avahi-common/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* \section choose_api Choosing an API
*
* Avahi provides three programming APIs for integration of
* mDNS/DNS-SD features into your C progams:
* mDNS/DNS-SD features into your C programs:
*
* \li <b>avahi-core</b>: an API for embedding a complete mDNS/DNS-SD stack
* into your software. This is intended for developers of embedded
Expand All @@ -41,10 +41,10 @@
* using this API for software written in any language other than
* C (e.g. Python).
* \li <b>avahi-client</b>: a simplifying C wrapper around the D-Bus API. We
* recommend using this API in C or C++ progams. The D-Bus internals
* recommend using this API in C or C++ programs. The D-Bus internals
* are hidden completely.
* \li <b>avahi-gobject</b>: an object-oriented C wrapper based on
* GLib's GObject. We recommd using this API for GNOME/Gtk programs.
* GLib's GObject. We recommend using this API for GNOME/Gtk programs.
*
* All three APIs are very similar, however avahi-core is the most powerful.
*
Expand Down Expand Up @@ -114,7 +114,7 @@
* avahi_client_new(). An adapter for this abstraction layer is
* available for the GLib main loop in the object AvahiGLibPoll. A
* simple stand-alone implementation is available under the name
* AvahiSimplePoll. An adpater for the Qt main loop is available from
* AvahiSimplePoll. An adapter for the Qt main loop is available from
* avahi_qt_poll_get().
*
* \section good_publish How to Register Services
Expand Down Expand Up @@ -204,9 +204,9 @@
* returned by AvahiDomainBrowser is assembled by the browsing domains
* configured in the daemon's configuration file, the domains
* announced inside the default domain, the domains set with the
* environment variable $AVAHI_BROWSE_DOMAINS (colon-seperated) on the
* environment variable $AVAHI_BROWSE_DOMAINS (colon-separated) on the
* client side and the domains set in the XDG configuration file
* ~/.config/avahi/browse-domains on the client side (seperated by
* ~/.config/avahi/browse-domains on the client side (separated by
* newlines). File managers offering some kind of "Network
* Neighborhood" folder should show the entries of the default domain
* right inside that and offer subfolders for the browsing domains
Expand All @@ -228,7 +228,7 @@ typedef enum {

/** States of an entry group object */
typedef enum {
AVAHI_ENTRY_GROUP_UNCOMMITED, /**< The group has not yet been commited, the user must still call avahi_entry_group_commit() */
AVAHI_ENTRY_GROUP_UNCOMMITED, /**< The group has not yet been committed, the user must still call avahi_entry_group_commit() */
AVAHI_ENTRY_GROUP_REGISTERING, /**< The entries of the group are currently being registered */
AVAHI_ENTRY_GROUP_ESTABLISHED, /**< The entries have successfully been established */
AVAHI_ENTRY_GROUP_COLLISION, /**< A name collision for one of the entries in the group has been detected, the entries have been withdrawn */
Expand Down
4 changes: 2 additions & 2 deletions avahi-common/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ enum {

AVAHI_ERR_NOT_FOUND = -30, /**< Not found */
AVAHI_ERR_INVALID_CONFIG = -31, /**< Configuration error */
AVAHI_ERR_VERSION_MISMATCH = -32, /**< Verson mismatch */
AVAHI_ERR_VERSION_MISMATCH = -32, /**< Version mismatch */
AVAHI_ERR_INVALID_SERVICE_SUBTYPE = -33, /**< Invalid service subtype */
AVAHI_ERR_INVALID_PACKET = -34, /**< Invalid packet */
AVAHI_ERR_INVALID_DNS_ERROR = -35, /**< Invlaid DNS return code */
AVAHI_ERR_INVALID_DNS_ERROR = -35, /**< Invalid DNS return code */
AVAHI_ERR_DNS_FORMERR = -36, /**< DNS Error: Form error */
AVAHI_ERR_DNS_SERVFAIL = -37, /**< DNS Error: Server Failure */
AVAHI_ERR_DNS_NXDOMAIN = -38, /**< DNS Error: No such domain */
Expand Down
2 changes: 1 addition & 1 deletion avahi-common/strlst.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ AvahiStringList *avahi_string_list_add_many_va(AvahiStringList *r, va_list va);
/** @{ \name String list operations */

/** Convert the string list object to a single character string,
* seperated by spaces and enclosed in "". avahi_free() the result! This
* separated by spaces and enclosed in "". avahi_free() the result! This
* function doesn't work well with strings that contain NUL bytes. */
char* avahi_string_list_to_string(AvahiStringList *l);

Expand Down
2 changes: 1 addition & 1 deletion avahi-common/watch.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct AvahiPoll {
callback function when the absolute time *tv is reached. If tv is
NULL, the timeout is disabled. After the timeout expired the
callback function will be called and the timeout is disabled. You
can reenable it by calling timeout_update() */
can re-enable it by calling timeout_update() */
AvahiTimeout* (*timeout_new)(const AvahiPoll *api, const struct timeval *tv, AvahiTimeoutCallback callback, void *userdata);

/** Update the absolute expiration time for a timeout, If tv is
Expand Down
2 changes: 1 addition & 1 deletion avahi-compat-howl/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ static void service_resolver_callback(

/* 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'. "
avahi_warn("A service failed to resolve in the HOWL compatibility 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!",
avahi_exe_name());
Expand Down
2 changes: 1 addition & 1 deletion avahi-compat-howl/warn.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
***/

/* To avoid symbol name clashes when a process links to both our
* compatiblity layers, we move the symbols out of the way here */
* compatibility layers, we move the symbols out of the way here */

#define avahi_warn_unsupported avahi_warn_unsupported_HOWL
#define avahi_warn_linkage avahi_warn_linkage_HOWL
Expand Down
8 changes: 4 additions & 4 deletions avahi-compat-libdns_sd/dns_sd.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ enum
kDNSServiceFlagsDefault = 0x4,
/* Flags for domain enumeration and browse/query reply callbacks.
* "Default" applies only to enumeration and is only valid in
* conjuction with "Add". An enumeration callback with the "Add"
* conjunction with "Add". An enumeration callback with the "Add"
* flag NOT set indicates a "Remove", i.e. the domain is no longer
* valid.
*/
Expand Down Expand Up @@ -684,7 +684,7 @@ DNSServiceErrorType DNSSD_API DNSServiceRegister
*
* sdRef: A DNSServiceRef initialized by DNSServiceRegister().
*
* RecordRef: A pointer to an uninitialized DNSRecordRef. Upon succesfull completion of this
* RecordRef: A pointer to an uninitialized DNSRecordRef. Upon successful completion of this
* call, this ref may be passed to DNSServiceUpdateRecord() or DNSServiceRemoveRecord().
* If the above DNSServiceRef is passed to DNSServiceRefDeallocate(), RecordRef is also
* invalidated and may not be used further.
Expand Down Expand Up @@ -1080,7 +1080,7 @@ DNSServiceErrorType DNSSD_API DNSServiceCreateConnection(DNSServiceRef *sdRef);
*
* sdRef: A DNSServiceRef initialized by DNSServiceCreateConnection().
*
* RecordRef: A pointer to an uninitialized DNSRecordRef. Upon succesfull completion of this
* RecordRef: A pointer to an uninitialized DNSRecordRef. Upon successful completion of this
* call, this ref may be passed to DNSServiceUpdateRecord() or DNSServiceRemoveRecord().
* (To deregister ALL records registered on a single connected DNSServiceRef
* and deallocate each of their corresponding DNSServiceRecordRefs, call
Expand Down Expand Up @@ -1708,7 +1708,7 @@ DNSServiceErrorType DNSSD_API DNSServiceSetDefaultDomainForUser
// and report errors at compile-time if anything is wrong. The usual way to do this would
// be to use a run-time "if" statement or the conventional run-time "assert" mechanism, but
// then you don't find out what's wrong until you run the software. This way, if the assertion
// condition is false, the array size is negative, and the complier complains immediately.
// condition is false, the array size is negative, and the compiler complains immediately.

struct DNS_SD_CompileTimeAssertionChecks
{
Expand Down
2 changes: 1 addition & 1 deletion avahi-core/announce.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ static void reannounce(AvahiAnnouncer *a) {
assert(a);
e = a->entry;

/* If the group this entry belongs to is not even commited, there's nothing to reannounce */
/* If the group this entry belongs to is not even committed, there's nothing to reannounce */
if (e->group && (e->group->state == AVAHI_ENTRY_GROUP_UNCOMMITED || e->group->state == AVAHI_ENTRY_GROUP_COLLISION))
return;

Expand Down
2 changes: 1 addition & 1 deletion avahi-core/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int avahi_cache_entry_half_ttl(AvahiCache *c, AvahiCacheEntry *e);
* records of the specified key. The specified address is */
void avahi_cache_start_poof(AvahiCache *c, AvahiKey *key, const AvahiAddress *a);

/* Stop a previously started POOF algorithm for a record. (Used for response suppresions records */
/* Stop a previously started POOF algorithm for a record. (Used for response suppression records */
void avahi_cache_stop_poof(AvahiCache *c, AvahiRecord *record, const AvahiAddress *a);

void avahi_cache_flush(AvahiCache *c);
Expand Down
6 changes: 3 additions & 3 deletions avahi-core/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ const char* avahi_server_get_host_name(AvahiServer *s);
const char* avahi_server_get_host_name_fqdn(AvahiServer *s);

/** Change the host name of a running mDNS responder. This will drop
all automicatilly generated RRs and readd them with the new
all automatically generated RRs and re-add them with the new
name. Since the responder has to probe for the new RRs this function
takes some time to take effect altough it returns immediately. This
takes some time to take effect although it returns immediately. This
function is intended to be called when a host name conflict is
reported using AvahiServerCallback. The caller should readd all user
reported using AvahiServerCallback. The caller should re-add all user
defined RRs too since they otherwise continue to point to the outdated
host name..*/
int avahi_server_set_host_name(AvahiServer *s, const char *host_name);
Expand Down
2 changes: 1 addition & 1 deletion avahi-core/dns-srv-rr.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ typedef enum {
} AvahiDNSServerType;

/** Publish the specified unicast DNS server address via mDNS. You may
* browse for records create this way wit
* browse for records created this way with
* avahi_s_dns_server_browser_new(). */
int avahi_server_add_dns_server_address(
AvahiServer *s,
Expand Down
8 changes: 4 additions & 4 deletions avahi-core/iface-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat
return;

/* Try to get a reference to our AvahiInterface object for the
* interface this address is assigned to. If ther is no object
* interface this address is assigned to. If there is no object
* for this interface, we ignore this address. */
if (!(i = avahi_interface_monitor_get_interface(m, (AvahiIfIndex) ifaddrmsg->ifa_index, avahi_af_to_proto(ifaddrmsg->ifa_family))))
return;
Expand Down Expand Up @@ -239,7 +239,7 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat
a = RTA_NEXT(a, l);
}

/* If there was no adress attached to this message, let's quit. */
/* If there was no address attached to this message, let's quit. */
if (rlocal_valid)
r = &rlocal;
else if (raddr_valid)
Expand Down Expand Up @@ -306,7 +306,7 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat

/* Only after this boolean variable has been set, Avahi
* will start to announce or browse on all interfaces. It
* is originaly set to 0, which means that relevancy
* is originally set to 0, which means that relevancy
* checks and RR updates are disabled during the wild
* dumps. */
m->list_complete = 1;
Expand Down Expand Up @@ -387,5 +387,5 @@ void avahi_interface_monitor_sync(AvahiInterfaceMonitor *m) {
break;

/* At this point Avahi knows about all local interfaces and
* addresses in existance. */
* addresses in existence. */
}
Loading

0 comments on commit a0cb004

Please sign in to comment.