Skip to content

Commit

Permalink
Fixed typos in comments and documentation using codespell (see #3303)
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero committed Apr 16, 2024
1 parent 8cc3f08 commit ffecb2d
Show file tree
Hide file tree
Showing 40 changed files with 93 additions and 93 deletions.
2 changes: 1 addition & 1 deletion src/apierror.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define JANUS_ERROR_TRANSPORT_SPECIFIC 450
/*! \brief The request is missing in the message */
#define JANUS_ERROR_MISSING_REQUEST 452
/*! \brief The Janus core does not suppurt this request */
/*! \brief The Janus core does not support this request */
#define JANUS_ERROR_UNKNOWN_REQUEST 453
/*! \brief The payload is not a valid JSON message */
#define JANUS_ERROR_INVALID_JSON 454
Expand Down
2 changes: 1 addition & 1 deletion src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void janus_config_print(janus_config *config);
* @param[in] level The debugging level to use */
void janus_config_print_as(janus_config *config, int level);
/*! \brief Helper method to save a configuration to a file
* @param[in] config The configuration to sav
* @param[in] config The configuration to save
* @param[in] folder The folder the file should be saved to
* @param[in] filename The file name, extension included (should be .jcfg, or .cfg for legacy INI files)
* @returns 0 if successful, a negative integer otherwise */
Expand Down
2 changes: 1 addition & 1 deletion src/dtls.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ typedef struct janus_dtls_srtp {
janus_dtls_role dtls_role;
/*! \brief DTLS state of this component: -1=failed, 0=nothing, 1=trying, 2=connected */
janus_dtls_state dtls_state;
/*! \brief Monotonic time of when the DTLS handhake has started */
/*! \brief Monotonic time of when the DTLS handshake has started */
gint64 dtls_started;
/*! \brief Monotonic time of when the DTLS state has switched to connected */
gint64 dtls_connected;
Expand Down
2 changes: 1 addition & 1 deletion src/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void janus_events_notify_handlers(int type, int subtype, guint64 session_id, ...
char *opaque_id = va_arg(args, char *);
if(opaque_id != NULL) {
json_object_set_new(event, "opaque_id", json_string(opaque_id));
/* We add it to the body as well for backwards compatbility, as
/* We add it to the body as well for backwards compatibility, as
* that's the only place we had the opaque_id present before */
json_object_set_new(body, "opaque_id", json_string(opaque_id));
}
Expand Down
2 changes: 1 addition & 1 deletion src/events.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ gboolean janus_events_is_enabled(void);
void janus_events_notify_handlers(int type, int subtype, guint64 session_id, ...);

/*! \brief Helper method to change the mask of events a handler is interested in
* @note Every time this is called, the mask is resetted, which means that to
* @note Every time this is called, the mask is reset, which means that to
* unsubscribe from a single event you have to pass an updated list
* @param[in] list A comma separated string of event types to subscribe to
* @param[out] target The mask to update */
Expand Down
2 changes: 1 addition & 1 deletion src/events/eventhandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ janus_eventhandler *create(void) {
* - \c get_description(): this method should return a verbose description of your event handler plugin (e.g., "This is an event handler that saves some events on a database");
* - \c get_name(): this method should return a short display name for your event handler plugin (e.g., "My Amazing Event Handler");
* - \c get_package(): this method should return a unique package identifier for your event handler plugin (e.g., "janus.eventhandler.myeventhandler");
* - \c incoming_event(): this callack informs the event handler that an event is available for consumption.
* - \c incoming_event(): this callback informs the event handler that an event is available for consumption.
*
* All the above methods and callbacks are mandatory: the Janus core will
* reject an event handler plugin that doesn't implement any of the
Expand Down
6 changes: 3 additions & 3 deletions src/events/janus_mqttevh.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ static int janus_mqttevh_client_disconnect(janus_mqttevh_context *ctx) {
return MQTTAsync_disconnect(ctx->client, &options);
}

/* Callback for succesful MQTT disconnect */
/* Callback for successful MQTT disconnect */
static void janus_mqttevh_client_disconnect_success(void *context, MQTTAsync_successData *response) {
janus_mqttevh_client_disconnect_success_impl(context);
}
Expand Down Expand Up @@ -551,7 +551,7 @@ static int janus_mqttevh_client_publish_message(janus_mqttevh_context *ctx, cons
case MQTTASYNC_OPERATION_INCOMPLETE:
break;
default:
JANUS_LOG(LOG_WARN, "FAILURE: MQTT EVH message propably not sent to topic %s on %s. Result %d\n", topic, ctx->connect.url, rc);
JANUS_LOG(LOG_WARN, "FAILURE: MQTT EVH message probably not sent to topic %s on %s. Result %d\n", topic, ctx->connect.url, rc);
}

return rc;
Expand Down Expand Up @@ -581,7 +581,7 @@ static int janus_mqttevh_client_publish_message5(janus_mqttevh_context *ctx, con
case MQTTASYNC_OPERATION_INCOMPLETE:
break;
default:
JANUS_LOG(LOG_WARN, "FAILURE: MQTT EVH message propably not sent to topic %s on %s. Result %d\n", topic, ctx->connect.url, rc);
JANUS_LOG(LOG_WARN, "FAILURE: MQTT EVH message probably not sent to topic %s on %s. Result %d\n", topic, ctx->connect.url, rc);
}

return rc;
Expand Down
6 changes: 3 additions & 3 deletions src/ice.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ gboolean janus_ice_is_consent_freshness_enabled(void) {
static gboolean janus_ice_keepalive_connchecks = FALSE;
void janus_ice_set_keepalive_conncheck_enabled(gboolean enabled) {
if(janus_ice_consent_freshness && !enabled) {
JANUS_LOG(LOG_WARN, "Can't disable connectivity checks as PeerConnection keep-alives, consent freshness is enabled\n");
JANUS_LOG(LOG_WARN, "Can't disable connectivity checks as PeerConnection keep-alive, consent freshness is enabled\n");
return;
}
janus_ice_keepalive_connchecks = enabled;
if(janus_ice_keepalive_connchecks) {
JANUS_LOG(LOG_INFO, "Using connectivity checks as PeerConnection keep-alives\n");
JANUS_LOG(LOG_INFO, "Using connectivity checks as PeerConnection keep-alive\n");
}
}
gboolean janus_ice_is_keepalive_conncheck_enabled(void) {
Expand Down Expand Up @@ -3262,7 +3262,7 @@ static void janus_ice_cb_nice_recv(NiceAgent *agent, guint stream_id, guint comp
if (janus_rtcp_fix_report_data(buf, buflen, base_ts, base_ts_prev, ssrc_peer, ssrc_local, ssrc_expected, video) < 0) {
/* Drop packet in case of parsing error or SSRC different from the one expected. */
/* This might happen at the very beginning of the communication or early after */
/* a re-negotation has been concluded. */
/* a re-negotiation has been concluded. */
return;
}

Expand Down
6 changes: 3 additions & 3 deletions src/ice.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ int janus_ice_get_event_stats_period(void);
* @returns The current number of active PeerConnections */
int janus_ice_get_peerconnection_num(void);

/*! \brief Method to define wether the media stats shall be dispatched in one event (true) or in dedicated single events (false - default)
/*! \brief Method to define whether the media stats shall be dispatched in one event (true) or in dedicated single events (false - default)
* @param[in] combine_media_stats_to_one_event true to combine media statistics in on event or false to send dedicated events */
void janus_ice_event_set_combine_media_stats(gboolean combine_media_stats_to_one_event);
/*! \brief Method to retrieve wether media statistic events shall be dispatched combined or in single events
/*! \brief Method to retrieve whether media statistic events shall be dispatched combined or in single events
* @returns true to combine events */
gboolean janus_ice_event_get_combine_media_stats(void);

Expand Down Expand Up @@ -502,7 +502,7 @@ struct janus_ice_peerconnection {
janus_dtls_role dtls_role;
/*! \brief Data exchanged for DTLS handshakes and messages */
janus_ice_stats dtls_in_stats, dtls_out_stats;
/*! \brief Hashing algorhitm used by the peer for the DTLS certificate (e.g., "SHA-256") */
/*! \brief Hashing algorithm used by the peer for the DTLS certificate (e.g., "SHA-256") */
gchar *remote_hashing;
/*! \brief Hashed fingerprint of the peer's certificate, as parsed in SDP */
gchar *remote_fingerprint;
Expand Down
4 changes: 2 additions & 2 deletions src/ip-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ int janus_network_prepare_device_query_default(const char *user_value, janus_net
const struct ifaddrs *janus_network_query_devices(const struct ifaddrs *ifas, const janus_network_query_config *query);

/*!
* \brief Copies the IPv4 address from a network inteface description to the given result structure.
* \brief Copies the IPv4 address from a network interface description to the given result structure.
* \param ifa The network interface description to grab the IPv4 address from. It should be obtained with `janus_network_query_devices()`.
* \param query A description of the criteria to look for when determining whether or not a network interface is a match
* \param result Pointer to a structure to populate with the IPv4 address of the given network interface
Expand All @@ -125,7 +125,7 @@ const struct ifaddrs *janus_network_query_devices(const struct ifaddrs *ifas, co
int janus_network_get_devices_ipv4(const struct ifaddrs *ifa, const janus_network_query_config *query, struct in_addr *result);

/*!
* \brief Copies the IPv6 address from a network inteface description to the given result structure.
* \brief Copies the IPv6 address from a network interface description to the given result structure.
* \param ifa The network interface description to grab the IPv6 address from. It should be obtained with `janus_network_query_devices()`.
* \param query A description of the criteria to look for when determining whether or not a network interface is a match
* \param result Pointer to a structure to populate with the IPv6 address of the given network interface
Expand Down
2 changes: 1 addition & 1 deletion src/janus-cfgconv.1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ janus-cfgconv \- Janus config file conversion utility.
.IR destination.[cfg|jcfg]
.SH DESCRIPTION
.B janus-cfgconv
is a simple utility that allows you to convert Janus INI configuration files to libconfig format and viceversa.
is a simple utility that allows you to convert Janus INI configuration files to libconfig format and vice-versa.
.SH OPTIONS
.TP
.BR \-h ", " \-\-help
Expand Down
2 changes: 1 addition & 1 deletion src/janus-cfgconv.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*! \file janus-cfgconv.c
* \author Lorenzo Miniero <[email protected]>
* \copyright GNU General Public License v3
* \brief Simple utility to convert Janus .cfg files to .jcfg and viceversa
* \brief Simple utility to convert Janus .cfg files to .jcfg and vice-versa
* \details Historically, Janus has made use of INI .cfg files for the
* configuration of core and plugins. Recently, support for the libconfig format
* has been added too. Due to the more expressive nature of libconfig, .jcfg
Expand Down
2 changes: 1 addition & 1 deletion src/loggers/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ janus_logger *create(void) {
* - \c get_description(): this method should return a verbose description of your logger plugin (e.g., "This is a logger that saves log lines on a database");
* - \c get_name(): this method should return a short display name for your logger plugin (e.g., "My Amazing Logger");
* - \c get_package(): this method should return a unique package identifier for your logger plugin (e.g., "janus.logger.mylogger");
* - \c incoming_logline(): this callack informs the logger that a log line is available for consumption.
* - \c incoming_logline(): this callback informs the logger that a log line is available for consumption.
*
* All the above methods and callbacks are mandatory: the Janus core will
* reject al logger plugin that doesn't implement any of the mandatory callbacks.
Expand Down
8 changes: 4 additions & 4 deletions src/mach_gettime.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ typedef int clockid_t;
#endif

/* the mach kernel uses struct mach_timespec, so struct timespec
is loaded from <sys/_types/_timespec.h> for compatability */
is loaded from <sys/_types/_timespec.h> for compatibility */
// struct timespec { time_t tv_sec; long tv_nsec; };

int clock_gettime(clockid_t clk_id, struct timespec *tp);
Expand All @@ -35,13 +35,13 @@ int clock_gettime(clockid_t clk_id, struct timespec *tp);
static double mt_timebase = 0.0;
static uint64_t mt_timestart = 0;

// TODO be more careful in a multithreaded environement
// TODO be more careful in a multithreaded environment
int clock_gettime(clockid_t clk_id, struct timespec *tp)
{
kern_return_t retval = KERN_SUCCESS;
if( clk_id == TIMER_ABSTIME)
{
if (!mt_timestart) { // only one timer, initilized on the first call to the TIMER
if (!mt_timestart) { // only one timer, initialized on the first call to the TIMER
mach_timebase_info_data_t tb = { 0 };
mach_timebase_info(&tb);
mt_timebase = tb.numer;
Expand All @@ -53,7 +53,7 @@ int clock_gettime(clockid_t clk_id, struct timespec *tp)
tp->tv_sec = diff * MT_NANO;
tp->tv_nsec = diff - (tp->tv_sec * MT_GIGA);
}
else // other clk_ids are mapped to the coresponding mach clock_service
else // other clk_ids are mapped to the corresponding mach clock_service
{
clock_serv_t cclock;
mach_timespec_t mts;
Expand Down
18 changes: 9 additions & 9 deletions src/mainpage.dox
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* reference should you be interested in writing a new plugin from
* scratch (and you're definitely welcome to!). A \ref pluginapi to
* create new plugins, or understand how they're conceived, is documented
* as well. A documentation on the available API tranports and the
* as well. A documentation on the available API transports and the
* HTTP/WebSocket JavaScript API to use Janus and the plugins it
* makes available in your web application can be found in the \ref JS
* and \ref rest pages. New API transports can be created referring to
Expand Down Expand Up @@ -499,7 +499,7 @@ janus.attach(
* - \c tracks: you can use this property to tell the library which media (audio/video/data)
* you're interested in, and whether you're going to send and/or receive any of them; by default
* no device is captured, and Data Channels are disabled as well; incoming audio and video
* is instead autoaccepted unless you tell the library otherwose; the same property can also
* is instead autoaccepted unless you tell the library otherwise; the same property can also
* be used to update sessions (e.g., to add/remove/replace tracks); this option is an array of
* objects, where each object can take any of the following properties:
* - \c type: mandatory, must be one of "audio", "video", "screen" and "data";
Expand Down Expand Up @@ -906,7 +906,7 @@ echotest.createOffer(
* \section js-webpack Using janus.js directly with Webpack and other bundlers
*
* Generating a converted version of \c janus.js and copying it to your project is not always the best
* solution. In many situations it may be prefered to let your JavaScript module bundler (e.g.
* solution. In many situations it may be preferred to let your JavaScript module bundler (e.g.
* <a href="https://webpack.js.org">Webpack</a>) grab the file directly from the official Janus repository.
* Doing that you can manage \c janus.js just like any other dependency coming from Github or the npm Registry,
* getting rid of the manual copy step and letting the bundler take care of version management, updates
Expand Down Expand Up @@ -1067,7 +1067,7 @@ export const initialiseJanusLibrary = () => Janus.init({dependencies: setupDeps(
*
* The \c options argument may contain the following keys:
*
* -# \c timeout: a timeout in miliseconds which should be imposed on the request.
* -# \c timeout: a timeout in milliseconds which should be imposed on the request.
* The \c httpAPICall implementation is required to implement support for imposing timeouts
* on HTTP API requests.
* -# \c body: payload to include as body of the outgoing HTTP request.
Expand Down Expand Up @@ -2678,7 +2678,7 @@ else
server = "https://" + window.location.hostname + ":8089/janus";
\endverbatim
*
* that is evaulate the right address to use at runtime.
* that is evaluate the right address to use at runtime.
*
* Anyway, there's a much easier way to address these scenarios, which
* is explained in the next section.
Expand Down Expand Up @@ -2943,7 +2943,7 @@ WantedBy=multi-user.target
* \note Remember to adjust the path in ExecStart to match the Janus binary path.
*
* \warning Please beware that, per the default \c RateLimitInterval and
* and \c RateLimitBurst values in the default sytemd configuration, logger
* and \c RateLimitBurst values in the default systemd configuration, logger
* messages are dropped if they arrive faster than ~33 per second. You
* may want to configure them accordingly, or otherwise Janus log messages
* may be missing. To fix this, setting <code>RateLimitInterval=1s</code>
Expand Down Expand Up @@ -4013,7 +4013,7 @@ ldd janus | grep asan
* When we chose the name, we wanted it to sound like
* <a href="https://www.youtube.com/watch?v=TkgDOMSv9PE">this</a>,
* which means \a awesome! in Italian. The extra H was a mistake on our
* side, as obviously \a echo is pronouced differently than \a eco! Long
* side, as obviously \a echo is pronounced differently than \a eco! Long
* story short, it doesn't really matter how you pronounce it: just
* do it and help us be famous! :-)\n\n
* .
Expand Down Expand Up @@ -4161,7 +4161,7 @@ ldd janus | grep asan
* before the \c bootstrap and \c configure steps in the \c usrsctp
* compilation:\n\n
*\verbatim
export CFLAGS="-fno-strict-aliasing" ./boostrap
export CFLAGS="-fno-strict-aliasing" ./bootstrap
export CFLAGS="-fno-strict-aliasing" ./configure --prefix=/usr
make && make install
\endverbatim
Expand Down Expand Up @@ -4245,7 +4245,7 @@ ldd janus | grep asan
* Since version \c 0.0.6, you can! This is a feature that several
* developers asked for, especially those that are interested in wrapping
* the Janus API on the server side, and implement the communication
* on the client side their own way. Specificaly, Janus now supports
* on the client side their own way. Specifically, Janus now supports
* RabbitMQ based messaging as an alternative "transport" for API
* requests, responses and notifications, meaning it can be used with
* or without HTTP and WebSockets, depending on your requirements.
Expand Down
2 changes: 1 addition & 1 deletion src/mutex.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! \file mutex.h
* \author Lorenzo Miniero <[email protected]>
* \brief Semaphors, Mutexes and Conditions
* \brief Semaphores, Mutexes and Conditions
* \details Implementation (based on GMutex or pthread_mutex) of a locking mechanism based on mutexes and conditions.
*
* \ingroup core
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/audiobridge-deps/jitter.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ static spx_int16_t compute_opt_delay(JitterBuffer *jitter)
int j;
int next=-1;
int latest = 32767;
/* Pick latest amoung all sub-windows */
/* Pick latest among all sub-windows */
for (j=0;j<MAX_BUFFERS;j++)
{
if (pos[j] < tb[j].filled && tb[j].timing[pos[j]] < latest)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/audiobridge-deps/resample.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static void speex_free(void *ptr) {free(ptr);}
#include "resample_neon.h"
#endif

/* Numer of elements to allocate on the stack */
/* Number of elements to allocate on the stack */
#ifdef VAR_ARRAYS
#define FIXED_STACK_ALLOC 8192
#else
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/janus_audiobridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ room-<unique room ID>: {
* or restarts take place, they MUST follow the same negotiation pattern
* as the one that originated the connection: it's an error to send an
* SDP offer to the plugin to update a PeerConnection, if the plugin sent
* you an offer originally. It's adviced to let users generate the offer,
* you an offer originally. It's advised to let users generate the offer,
* and let the plugin answer: this reverserd role is mostly here to
* facilitate the setup of cascaded mixers, e.g., allow one AudioBridge
* to connect to the other via WebRTC (which wouldn't be possible if
Expand Down Expand Up @@ -7801,7 +7801,7 @@ static void *janus_audiobridge_handler(void *data) {
if(sdp != NULL) {
participant->opus_pt = janus_sdp_get_codec_pt(sdp, -1, "opus");
if(participant->opus_pt > 0 && strstr(msg_sdp, "useinbandfec=1")){
/* Opus codec, inband FEC setted */
/* Opus codec, inband FEC set */
participant->fec = TRUE;
participant->probation = MIN_SEQUENTIAL;
opus_encoder_ctl(participant->encoder, OPUS_SET_INBAND_FEC(participant->fec));
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/janus_duktape_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* \copyright GNU General Public License v3
* \brief Janus Duktape data/session definition (headers)
* \details The Janus Duktape plugin implements all the mandatory hooks to
* allow the C code to interact with a custom JavaScript script, and viceversa.
* allow the C code to interact with a custom JavaScript script, and vice-versa.
* That said, the janus_duktape_extra.c code allows for custom hooks to be
* added in C, to expose additional JavaScript functions and implement more
* complex media management than the one provided by the stock plugin.
Expand Down
Loading

0 comments on commit ffecb2d

Please sign in to comment.