Browse Source

src/lib: typos

Дилян Палаузов 2 years ago
parent
commit
fdce4fe980

+ 3 - 3
src/lib/Makefile.defs

@@ -88,11 +88,11 @@ endif
 #		@makedepend -fMakefile.deps -- ${DEFS} ${CFLAGS} ${INCLUDES} -- ${DEP_IN} 2>/dev/null
 #		-@rm -f Makefile.deps.bak
 
-# instalation rules
+# installation rules
 
 ifeq ($(TYPE),lib)
 
-# library instalation
+# library installation
 
 install:	${out_name} install_dirs
 			$(install-lib) ${out_name} $(lib-dir)
@@ -104,7 +104,7 @@ install_dirs:	$(lib-dir) $(include-dir)/$(NAME)
 
 else
 
-# executable instalation
+# executable installation
 
 install:	${out_name} install_dirs
 			$(install-bin) ${out_name} $(bin-dir)

+ 1 - 1
src/lib/README

@@ -14,7 +14,7 @@ Libraries common to modules:
 cds - Common Data Structures (basic string operations, dynamic string,
       vector, message queue, ...)
 
-presence - Library holding common structures and functions abaut presence
+presence - Library holding common structures and functions about presence
            (API for internal subscriptions, common presence structures,
            common presence data formats)
            requires internal libraries: cds

+ 1 - 1
src/lib/binrpc/binrpc_api.c

@@ -944,7 +944,7 @@ int binrpc_parse_response(struct binrpc_val** vals, int* val_count,
 		*vals = NULL;
 	}
 	else if (i<*val_count){
-/*		do not try to save memory because it causes fragmentation when used ser mem utils and "regualar" memory leak
+/*		do not try to save memory because it causes fragmentation when used ser mem utils and "regular" memory leak
 		struct binrpc_val *t;
 		t = (struct binrpc_val*) binrpc_realloc(*vals, i*sizeof(**vals));
 		if (t) *vals = t;

+ 1 - 1
src/lib/binrpc/binrpc_api.h

@@ -102,7 +102,7 @@ void binrpc_close_connection(struct binrpc_handle* handle);
  * Description:
  *   The function send_command provides interface for communication with server 
  *   application via binary rpc protocol. It sends request over unix socket or 
- *   TCP/UDPto the host and reads a respons.
+ *   TCP/UDP to the host and reads a response.
  * 
  * @param handle [in]: a descriptor of connection
  * @param method [in]: string value of XMLRPC method (e.g. system.listMethods)

+ 2 - 2
src/lib/cds/doc/destroy_sstream.xml

@@ -29,9 +29,9 @@
 <refsect1><title>Description</title>
 <para>
 Destroys serialization stream and frees all internal data buffers. After calling
-this function can NOT be called any other serialization stream manipulation
+this function no other serialization stream manipulation
 function except <function>init_input_sstream</function> or
-<function>init_ouput_stream</function>.
+<function>init_output_stream</function> can be called.
 <!-- detailed description -->
 </para>
 

+ 1 - 1
src/lib/cds/dstring.h

@@ -62,7 +62,7 @@ typedef struct _dstr_buff_t {
 } dstr_buff_t;
 
 /** Dynamic string structure. It is used
- * for muliple appends of any strings. 
+ * for multiple appends of any string.
  *
  * \note There was an attempt to add flags for SHM/PKG memory using, ...
  * but it shows that it slows down, thus they were removed and only the

+ 1 - 1
src/lib/cds/msg_queue.c

@@ -166,7 +166,7 @@ int msg_queue_init_ex(msg_queue_t *q, int synchronize)
 }
 
 /** \internal Destroys all internal data of message queue and 
- * optionaly frees it if no more references exist. */
+ * optionally frees it if no more references exist. */
 static inline void msg_queue_destroy_and_free(msg_queue_t *q, int do_free)
 {
 	mq_message_t *m,*n;

+ 7 - 7
src/lib/cds/msg_queue.h

@@ -40,7 +40,7 @@ extern "C" {
  * Message queue is a structure useful for sending data between processes.
  * It can be synchronized via its own mutex or the synchronization can
  * be left on caller. It can use reference counter which is useful
- * when accessing dynamicaly allocated queue destroyed by its last user.
+ * when accessing dynamically allocated queue destroyed by its last user.
  *
  * \todo To meaningfully use reference counters it is needed to add
  * function for adding new reference to message queue.
@@ -54,12 +54,12 @@ typedef void (*destroy_function_f)(void *);
 /** Structure holding message which can be put
  * into message queue.
  *
- * There is a need to allow destroing the message without knowing its
+ * There is a need to allow destroying the message without knowing its
  * internals (destroying message queue with non-processed messages) and thus
  * the destroy_function able to fully destroy whole data hold by message must
  * be given. It is mostly needed to choose the function manually only for
  * complex data with pointers which content need to be freed too.
- * For simple structures it is set automaticaly during the message creation.
+ * For simple structures it is set automatically during the message creation.
  */
 typedef struct _mq_message_t {
 	/** pointer to data hold by the message */
@@ -122,14 +122,14 @@ typedef struct msg_queue {
 #define get_message_data_len(msg)	(msg ? msg->data_len: 0)
 
 /** The space for data is allocated in messages data
- * (they are automaticaly freed!)! Pointer to allocated
+ * (they are automatically freed!)! Pointer to allocated
  * data bytes is in data variable in the message structure. */
 mq_message_t *create_message_ex(int data_len);
 
 /** Creates message holding data allocated using cds_malloc.
  * Data must be allocated using cds_malloc or there must be
  * set destroy function via \ref set_data_destroy_function
- * because they are automaticaly freed by free_message! */
+ * because they are automatically freed by free_message! */
 mq_message_t *create_message(void *data, int data_len);
 
 /** Sets function which will be called by free_message to destroy data. 
@@ -140,7 +140,7 @@ void set_data_destroy_function(mq_message_t *msg, destroy_function_f func);
 
 /** Initializes message.
  * If auto_free set, data must be allocated using cds_malloc and are
- * automaticaly freed by free_message (and if msg_queue_destroy called) */
+ * automatically freed by free_message (and if msg_queue_destroy called) */
 void init_message_ex(mq_message_t *m, void *data, int data_len, destroy_function_f func);
 
 /** Frees the message and data hold by the message. */
@@ -173,7 +173,7 @@ void msg_queue_init_ref_cnt(msg_queue_t *q, reference_counter_group_t *grp);
 
 /** Destroys message queue if no more references exist. 
  * This function destroys all message queue internal data but doesn't free
- * the message queue itself. It can be useful for staticaly allocated queues
+ * the message queue itself. It can be useful for statically allocated queues
  * or when allocated not using cds_malloc. */
 void msg_queue_destroy(msg_queue_t *q);
 

+ 1 - 1
src/lib/cds/sstr.h

@@ -53,7 +53,7 @@ typedef struct {
 
 #define str_len(ptr)	((ptr)?(ptr)->len:0)
 
-/** transalate zero-terminated string to str_t (both uses the input buffer!)*/
+/** translate zero-terminated string to str_t (both uses the input buffer!)*/
 str_t zt2str(char *str);
 
 /** returns 1 if the string is empty */

+ 2 - 2
src/lib/ims/ims_getters.c

@@ -943,8 +943,8 @@ struct via_body* cscf_get_first_via(struct sip_msg *msg,struct hdr_field **h)
 }
 
 /**
- * Looks for the UE Via in First Via header if its a request
- * or in the last if its a response and returns its body
+ * Looks for the UE Via in First Via header if it is a request
+ * or in the last if it is a response and returns its body
  * @param msg - the SIP message
  * @returns the via of the UE
  */

+ 2 - 2
src/lib/ims/ims_getters.h

@@ -253,8 +253,8 @@ struct via_body* cscf_get_first_via(struct sip_msg *msg, struct hdr_field **h);
  */
 struct via_body* cscf_get_last_via(struct sip_msg *msg);
 /**
- * Looks for the UE Via in First Via header if its a request
- * or in the last if its a response and returns its body
+ * Looks for the UE Via in First Via header if it is a request
+ * or in the last if it is a response and returns its body
  * @param msg - the SIP message
  * @returns the via of the UE
  */

+ 1 - 1
src/lib/presence/notifier.h

@@ -44,7 +44,7 @@ notifier_t *register_notifier(
 
 void unregister_notifier(notifier_domain_t *domain, notifier_t *info);
 
-/** accepts subscription (internaly adds reference to it), thus it can 
+/** accepts subscription (internally adds reference to it), thus it can
  * be handled by notifier which called this function 
  * MUST be called in notifier's subscribe function, otherwise the 
  * subscription can NOT be accepted 

+ 5 - 5
src/lib/presence/notifier_domain.c

@@ -121,7 +121,7 @@ static void destroy_package(notifier_package_t *p)
 		s = ns;
 	}
 	
-	/* !!! don't release notifiers - its their job !!! */
+	/* !!! don't release notifiers - it is their job !!! */
 	/* it may lead to errors there */
 	/* e = p->first_notifier;
 	while (e) {
@@ -230,7 +230,7 @@ static void remove_notifier_from_subscription(qsa_subscription_t *s, notifier_t
 	for (i = 0; i < cnt; i++) {
 		ss = vector_get_ptr(&s->server_subscriptions, i);
 		if (!ss) continue;
-		/ * FIXME: call n->unsubsribe ??? 
+		/ * FIXME: call n->unsubscribe ???
 		 * NO this is called from unregister which is initiated
 		 * by the notifier (may be synchronized there!) * /
 		if (ss->notifier == n) ss->notifier = NULL; / * "zombie" * /
@@ -379,8 +379,8 @@ void unregister_notifier(notifier_domain_t *domain, notifier_t *info)
 
 /* -------- Subscriber functions -------- */
 
-/* If a notifier publishing watched state registeres after subscibe
- * call, it receives the subscription automaticaly too! */
+/* If a notifier publishing watched state registers after subscribe
+ * call, it receives the subscription automatically too! */
 qsa_subscription_t *subscribe(notifier_domain_t *domain, 
 		str_t *package,
 		qsa_subscription_data_t *data)
@@ -480,7 +480,7 @@ void unsubscribe(notifier_domain_t *domain, qsa_subscription_t *s)
 	s->data = NULL;
 	unlock_subscription_data(s);
 	
-	/* remove clients reference (dont give references to client?) */
+	/* remove clients reference (don't give references to client?) */
 	remove_reference(&s->ref);
 	
 	release_subscription(s); 

+ 2 - 2
src/lib/presence/subscriber.h

@@ -34,8 +34,8 @@
 extern "C" {
 #endif
 
-/* If a notifier publishing watched state registeres after subscibe
- * call, it receives the subscription automaticaly too! */
+/* If a notifier publishing watched state registers after subscribe
+ * call, it receives the subscription automatically too! */
 /*qsa_subscription_t *subscribe(notifier_domain_t *domain, 
 		qsa_subscription_t *params);*/
 qsa_subscription_t *subscribe(notifier_domain_t *domain, 

+ 1 - 1
src/lib/presence/xml_utils.c

@@ -136,7 +136,7 @@ int cmp_node(xmlNode *node, const char *name, const char *nspace)
 
 time_t xmltime2time(const char *xt)
 {
-	/* TODO: translate XML time in input parametr to time_t structure */
+	/* TODO: translate XML time in input parameter to time_t structure */
 	ERROR_LOG("can't translate xmltime to time_t: not finished yet!\n");
 	return 0;
 }

+ 1 - 1
src/lib/srdb2/db_con.c

@@ -94,7 +94,7 @@ db_con_t* db_con(db_ctx_t* ctx, db_uri_t* uri)
 
 
 /*
- * Releaase all memory used by the structure
+ * Release all memory used by the structure
  */
 void db_con_free(db_con_t* con)
 {

+ 2 - 2
src/lib/srdb2/db_gen.h

@@ -139,7 +139,7 @@ struct db_drv;
  *
  * All variables and attributes to be shared across all DB API
  * structures should be put into this structure. This structure
- * is at the beginnning of each DB API structure to ensure that
+ * is at the beginning of each DB API structure to ensure that
  * all DB API structures share some common variables.
  */
 typedef struct db_gen {
@@ -156,7 +156,7 @@ typedef struct db_gen {
 
 /*
  * Global variable holding the current index of the payload of the driver that
- * is being executed. DB API is responsible for setting this vaiable before 
+ * is being executed. DB API is responsible for setting this variable before
  * calling functions of DB drivers.
  */
 extern int db_payload_idx;

+ 1 - 1
src/lib/xcap/xcap_client.c

@@ -190,7 +190,7 @@ int xcap_query(const char *uri,
 static size_t write_data_func(void *ptr, size_t size, size_t nmemb, void *stream)
 {
 	int s = size * nmemb;
-/*	TRACE_LOG("%d bytes writen\n", s);*/
+/*	TRACE_LOG("%d bytes written\n", s);*/
 	if (s != 0) {
 		if (dstr_append((dstring_t*)stream, ptr, s) != 0) {
 			ERROR_LOG("can't append %d bytes into data buffer\n", s);

+ 1 - 1
src/lib/xcap/xml_utils.c

@@ -136,7 +136,7 @@ int cmp_node(xmlNode *node, const char *name, const char *nspace)
 
 time_t xmltime2time(const char *xt)
 {
-	/* TODO: translate XML time in input parametr to time_t structure */
+	/* TODO: translate XML time in input parameter to time_t structure */
 	ERROR_LOG("can't translate xmltime to time_t: not finished yet!\n");
 	return 0;
 }