浏览代码

core: typos

Дилян Палаузов 2 年之前
父节点
当前提交
9e4b47f75a

+ 3 - 3
src/core/async_task.c

@@ -143,7 +143,7 @@ int async_task_init(void)
 	int nrg = 0;
 	int nrg = 0;
 	async_wgroup_t *awg;
 	async_wgroup_t *awg;
 
 
-	LM_DBG("start initializing asynk task framework\n");
+	LM_DBG("start initializing async task framework\n");
 	if(_async_wgroup_list == NULL || _async_wgroup_list->workers <= 0)
 	if(_async_wgroup_list == NULL || _async_wgroup_list->workers <= 0)
 		return 0;
 		return 0;
 
 
@@ -184,7 +184,7 @@ int async_task_child_init(int rank)
 	if(_async_wgroup_list == NULL || _async_wgroup_list->workers <= 0)
 	if(_async_wgroup_list == NULL || _async_wgroup_list->workers <= 0)
 		return 0;
 		return 0;
 
 
-	LM_DBG("child initializing asynk task framework\n");
+	LM_DBG("child initializing async task framework\n");
 
 
 	if(rank == PROC_INIT) {
 	if(rank == PROC_INIT) {
 		if(async_task_init_sockets() < 0) {
 		if(async_task_init_sockets() < 0) {
@@ -406,7 +406,7 @@ int async_task_push(async_task_t *task)
 
 
 	len = write(_async_wgroup_list->sockets[1], &task, sizeof(async_task_t *));
 	len = write(_async_wgroup_list->sockets[1], &task, sizeof(async_task_t *));
 	if(len <= 0) {
 	if(len <= 0) {
-		LM_ERR("failed to pass the task to asynk workers\n");
+		LM_ERR("failed to pass the task to async workers\n");
 		return -1;
 		return -1;
 	}
 	}
 	LM_DBG("task sent [%p]\n", task);
 	LM_DBG("task sent [%p]\n", task);

+ 1 - 1
src/core/forward.c

@@ -72,7 +72,7 @@
 
 
 
 
 /* return a socket_info_pointer to the sending socket; as opposed to
 /* return a socket_info_pointer to the sending socket; as opposed to
- * get_send_socket, which returns process's default socket, get_out_socket
+ * get_send_socket, which returns process' default socket, get_out_socket
  * attempts to determine the outbound interface which will be used;
  * attempts to determine the outbound interface which will be used;
  * it uses a temporary connected socket to determine it; it will
  * it uses a temporary connected socket to determine it; it will
  * be very likely noticeably slower, but it can deal better with
  * be very likely noticeably slower, but it can deal better with

+ 1 - 1
src/core/mem/dl_malloc.c

@@ -304,7 +304,7 @@ MORECORE                  default: sbrk
 MORECORE_CONTIGUOUS       default: 1 (true)
 MORECORE_CONTIGUOUS       default: 1 (true)
   If true, take advantage of fact that consecutive calls to MORECORE
   If true, take advantage of fact that consecutive calls to MORECORE
   with positive arguments always return contiguous increasing
   with positive arguments always return contiguous increasing
-  addresses.  This is true of unix sbrk. It does not hurt too much to
+  addresses.  This is true for unix sbrk. It does not hurt too much to
   set it true anyway, since malloc copes with non-contiguities.
   set it true anyway, since malloc copes with non-contiguities.
   Setting it false when definitely non-contiguous saves time
   Setting it false when definitely non-contiguous saves time
   and possibly wasted space it would take to discover this though.
   and possibly wasted space it would take to discover this though.

+ 1 - 1
src/core/msg_translator.c

@@ -2768,7 +2768,7 @@ int branch_builder(unsigned int hash_index,
 }
 }
 
 
 
 
-/* uses only the send_info->send_socket, send_info->proto and
+/* uses only the send_info->send_socket, send_info->proto, send_info->id and
  * send_info->comp (so that a send_info used for sending can be passed
  * send_info->comp (so that a send_info used for sending can be passed
  * to this function w/o changes and the correct via will be built) */
  * to this function w/o changes and the correct via will be built) */
 char *via_builder(unsigned int *len, sip_msg_t *msg,
 char *via_builder(unsigned int *len, sip_msg_t *msg,

+ 1 - 1
src/core/parser/msg_parser.h

@@ -445,7 +445,7 @@ typedef struct sip_msg
 	 * runing failure handlers - see modules/tm/t_reply.c */
 	 * runing failure handlers - see modules/tm/t_reply.c */
 } sip_msg_t;
 } sip_msg_t;
 
 
-/*! \brief pointer to a fakes message which was never received ;
+/*! \brief pointer to a faked message which was never received ;
 	(when this message is "relayed", it is generated out
 	(when this message is "relayed", it is generated out
 	of the original request)
 	of the original request)
 */
 */

+ 1 - 1
src/core/parser/parse_via.c

@@ -1090,7 +1090,7 @@ find_value:
 						state = F_COMP_VALUE;
 						state = F_COMP_VALUE;
 						break;
 						break;
 /* '=' in any other COMP value state is an error,
 /* '=' in any other COMP value state is an error,
-					 * and it will be catched by the default branch */
+					 * and it will be caught by the default branch */
 #endif
 #endif
 					case P_STRING:
 					case P_STRING:
 						break;
 						break;

+ 1 - 1
src/core/socket_info.c

@@ -2065,7 +2065,7 @@ static int fix_socket_list(struct socket_info **list, int *type_flags)
 				ail = ail_next;
 				ail = ail_next;
 				continue;
 				continue;
 			}
 			}
-			/* 2. check if the extra addresses contain a duplicates for
+			/* 2. check if the extra addresses contain a duplicate for
 			 *  other addresses in the same list */
 			 *  other addresses in the same list */
 			for(tmp_ail = ail->next; tmp_ail;) {
 			for(tmp_ail = ail->next; tmp_ail;) {
 				tmp_ail_next = tmp_ail->next;
 				tmp_ail_next = tmp_ail->next;

+ 1 - 1
src/core/tcp_main.c

@@ -4464,7 +4464,7 @@ inline static int handle_tcpconn_ev(
 	if ((tcpconn->refcnt!=0)){
 	if ((tcpconn->refcnt!=0)){
 		/* FIXME: might be valid for sigio_rt iff fd flags are not cleared
 		/* FIXME: might be valid for sigio_rt iff fd flags are not cleared
 		 *        (there is a short window in which it could generate a sig
 		 *        (there is a short window in which it could generate a sig
-		 *         that would be catched by tcp_main) */
+		 *         that would be caught by tcp_main) */
 		LM_CRIT("handle_tcpconn_ev: io event on referenced"
 		LM_CRIT("handle_tcpconn_ev: io event on referenced"
 					" tcpconn (%p), refcnt=%d, fd=%d\n",
 					" tcpconn (%p), refcnt=%d, fd=%d\n",
 					tcpconn, tcpconn->refcnt, tcpconn->s);
 					tcpconn, tcpconn->refcnt, tcpconn->s);

+ 13 - 16
src/main.c

@@ -360,7 +360,7 @@ int timerlog = L_WARN;
    good for trouble-shooting
    good for trouble-shooting
 */
 */
 int sip_warning = 0;
 int sip_warning = 0;
-/* should localy-generated messages include server's signature?
+/* should locally-generated messages include server's signature?
    be default yes, good for trouble-shooting
    be default yes, good for trouble-shooting
 */
 */
 int server_signature=1;
 int server_signature=1;
@@ -405,8 +405,8 @@ int disable_core_dump=0; /* by default enabled */
 int open_files_limit=-1; /* don't touch it by default */
 int open_files_limit=-1; /* don't touch it by default */
 
 
 /* memory options */
 /* memory options */
-int shm_force_alloc=0; /* force immediate (on startup) page allocation
-						  (by writting 0 in the pages), useful if
+int shm_force_alloc = 0; /* force immediate (on startup) page allocation
+						  (by writing 0 in the pages), useful if
 						  mlock_pages is also 1 */
 						  mlock_pages is also 1 */
 int mlock_pages=0; /* default off, try to disable swapping */
 int mlock_pages=0; /* default off, try to disable swapping */
 
 
@@ -1048,9 +1048,8 @@ static void free_name_lst(struct name_lst* lst)
 }
 }
 
 
 
 
-
 /* parse h and returns a name lst (flags are set to SI_IS_MHOMED if
 /* parse h and returns a name lst (flags are set to SI_IS_MHOMED if
- * h contains more then one name or contains a name surrounded by '(' ')' )
+ * h contains more than one name or contains a name surrounded by '(' ')' )
  * valid formats:    "hostname"
  * valid formats:    "hostname"
  *                   "(hostname, hostname1, hostname2)"
  *                   "(hostname, hostname1, hostname2)"
  *                   "(hostname hostname1 hostname2)"
  *                   "(hostname hostname1 hostname2)"
@@ -1131,7 +1130,7 @@ error:
  * where proto= udp|tcp|tls|sctp
  * where proto= udp|tcp|tls|sctp
  * @param s  - string (like above)
  * @param s  - string (like above)
  * @param host - will be filled with the host part
  * @param host - will be filled with the host part
- *               Note: for multi-homing it wil contain all the addresses
+ *               Note: for multi-homing it will contain all the addresses
  *               (e.g.: "sctp:(1.2.3.4, 5.6.7.8)" => host="(1.2.3.4, 5.6.7.8)")
  *               (e.g.: "sctp:(1.2.3.4, 5.6.7.8)" => host="(1.2.3.4, 5.6.7.8)")
  * @param hlen - will be filled with the length of the host part.
  * @param hlen - will be filled with the length of the host part.
  * @param port - will be filled with the port if present or 0 if it's not.
  * @param port - will be filled with the port if present or 0 if it's not.
@@ -1200,7 +1199,7 @@ int parse_phostport(char* s, char** host, int* hlen,
 		*host=first+1;
 		*host=first+1;
 		*hlen=(int)(p-*host);
 		*hlen=(int)(p-*host);
 	}else{
 	}else{
-		/* valid port => its host:port */
+		/* valid port => it is host:port */
 		*proto=0;
 		*proto=0;
 		*host=s;
 		*host=s;
 		*hlen=(int)(first-*host);
 		*hlen=(int)(first-*host);
@@ -1222,14 +1221,13 @@ error_port:
 }
 }
 
 
 
 
-
 /** get protocol host, port and MH addresses list from a string representation.
 /** get protocol host, port and MH addresses list from a string representation.
  * parses [proto:]host[:port]  or
  * parses [proto:]host[:port]  or
  *  [proto:](host_1, host_2, ... host_n)[:port]
  *  [proto:](host_1, host_2, ... host_n)[:port]
  * where proto= udp|tcp|tls|sctp
  * where proto= udp|tcp|tls|sctp
  * @param s  - string (like above)
  * @param s  - string (like above)
  * @param host - will be filled with the host part
  * @param host - will be filled with the host part
- *               Note: for multi-homing it wil contain all the addresses
+ *               Note: for multi-homing it will contain all the addresses
  *               (e.g.: "sctp:(1.2.3.4, 5.6.7.8)" => host="(1.2.3.4, 5.6.7.8)")
  *               (e.g.: "sctp:(1.2.3.4, 5.6.7.8)" => host="(1.2.3.4, 5.6.7.8)")
  * @param hlen - will be filled with the length of the host part.
  * @param hlen - will be filled with the length of the host part.
  * @param port - will be filled with the port if present or 0 if it's not.
  * @param port - will be filled with the port if present or 0 if it's not.
@@ -1247,7 +1245,6 @@ static struct name_lst* parse_phostport_mh(char* s, char** host, int* hlen,
 }
 }
 
 
 
 
-
 /** Update \c cfg_file variable to contain full pathname or '-' (for stdin)
 /** Update \c cfg_file variable to contain full pathname or '-' (for stdin)
  * allocated in system memory. The function updates
  * allocated in system memory. The function updates
  * the value of \c cfg_file global variable to contain full absolute pathname
  * the value of \c cfg_file global variable to contain full absolute pathname
@@ -1255,7 +1252,7 @@ static struct name_lst* parse_phostport_mh(char* s, char** host, int* hlen,
  * determine the default path to the configuration file if the user did not
  * determine the default path to the configuration file if the user did not
  * specify one using the command line option. If \c cfg_file contains an
  * specify one using the command line option. If \c cfg_file contains an
  * absolute pathname then it is cloned unmodified, if it contains a relative
  * absolute pathname then it is cloned unmodified, if it contains a relative
- * pathanme than the value returned by \c getcwd function will be added at the
+ * pathname then the value returned by \c getcwd function will be added at the
  * beginning. This function must be run before changing its current working
  * beginning. This function must be run before changing its current working
  * directory to / (in daemon mode).
  * directory to / (in daemon mode).
  * @return Zero on success, negative number
  * @return Zero on success, negative number
@@ -2060,10 +2057,10 @@ int main(int argc, char** argv)
 	/* command line options */
 	/* command line options */
 	options=  ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:";
 	options=  ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:";
 	/* Handle special command line arguments, that must be treated before
 	/* Handle special command line arguments, that must be treated before
-	 * intializing the various subsystem or before parsing other arguments:
+	 * initializing the various subsystem or before parsing other arguments:
 	 *  - get the startup debug and log_stderr values
 	 *  - get the startup debug and log_stderr values
-	 *  - look if pkg mem size is overriden on the command line (-M) and get
-	 *    the new value here (before intializing pkg_mem).
+	 *  - look if pkg mem size is overridden on the command line (-M) and get
+	 *    the new value here (before initializing pkg_mem).
 	 *  - look if there is a -h, e.g. -f -h construction won't be caught
 	 *  - look if there is a -h, e.g. -f -h construction won't be caught
 	 *    later
 	 *    later
 	 */
 	 */
@@ -2870,7 +2867,7 @@ try_again:
 	ksr_sockets_index();
 	ksr_sockets_index();
 	if (default_core_cfg.dns_try_ipv6 && !(socket_types & SOCKET_T_IPV6)){
 	if (default_core_cfg.dns_try_ipv6 && !(socket_types & SOCKET_T_IPV6)){
 		/* if we are not listening on any ipv6 address => no point
 		/* if we are not listening on any ipv6 address => no point
-		 * to try to resovle ipv6 addresses */
+		 * to try to resolve ipv6 addresses */
 		default_core_cfg.dns_try_ipv6=0;
 		default_core_cfg.dns_try_ipv6=0;
 	}
 	}
 	/* print all the listen addresses */
 	/* print all the listen addresses */
@@ -3111,7 +3108,7 @@ error:
 #ifdef KSR_PTHREAD_MUTEX_SHARED
 #ifdef KSR_PTHREAD_MUTEX_SHARED
 
 
 /**
 /**
- * code to set PTHREAD_PROCESS_SHARED attribute for phtread mutex to cope
+ * code to set PTHREAD_PROCESS_SHARED attribute for pthread mutex to cope
  * with libssl 1.1+ thread-only mutex initialization
  * with libssl 1.1+ thread-only mutex initialization
  */
  */