Преглед изворни кода

core: Fix typos

(cherry picked from commit 5dd8f0a6ff30fd3aa917a98b006106bef61506e5)
Bastian Triller пре 3 година
родитељ
комит
d7fcb3178b
5 измењених фајлова са 11 додато и 11 уклоњено
  1. 1 1
      src/core/atomic/atomic_mips2.h
  2. 2 2
      src/core/dns_cache.c
  3. 1 1
      src/core/forward.c
  4. 2 2
      src/core/resolve.c
  5. 5 5
      src/core/tcp_main.c

+ 1 - 1
src/core/atomic/atomic_mips2.h

@@ -186,7 +186,7 @@
 
 
 /* %0=var, %1=*var, %2=new, %3=old :
 /* %0=var, %1=*var, %2=new, %3=old :
  * ret=*var; if *var==old  then *var=new; return ret
  * ret=*var; if *var==old  then *var=new; return ret
- * => if succesfull (changed var to new)  ret==old */
+ * => if successful (changed var to new)  ret==old */
 #define ATOMIC_CMPXCHG_DECL(NAME, P_TYPE) \
 #define ATOMIC_CMPXCHG_DECL(NAME, P_TYPE) \
 	inline static P_TYPE atomic_##NAME##_##P_TYPE (volatile P_TYPE *var, \
 	inline static P_TYPE atomic_##NAME##_##P_TYPE (volatile P_TYPE *var, \
 														P_TYPE old, \
 														P_TYPE old, \

+ 2 - 2
src/core/dns_cache.c

@@ -2581,9 +2581,9 @@ struct hostent* dns_srv_sip_resolvehost(str* name, unsigned short* port,
  *         tried      - bitmap used to keep track of the already tried records
  *         tried      - bitmap used to keep track of the already tried records
  *                      (no more then sizeof(tried)*8 valid records are
  *                      (no more then sizeof(tried)*8 valid records are
  *                      ever walked
  *                      ever walked
- *         srv_name   - if succesfull, it will be set to the selected record
+ *         srv_name   - if successful, it will be set to the selected record
  *                      srv name (naptr repl.)
  *                      srv name (naptr repl.)
- *         proto      - if succesfull it will be set to the selected record
+ *         proto      - if successful it will be set to the selected record
  *                      protocol
  *                      protocol
  * returns  0 if no more records found or a pointer to the selected record
  * returns  0 if no more records found or a pointer to the selected record
  *  and sets  protocol and srv_name
  *  and sets  protocol and srv_name

+ 1 - 1
src/core/forward.c

@@ -286,7 +286,7 @@ not_forced:
 #ifdef USE_TCP
 #ifdef USE_TCP
 		case PROTO_WS:
 		case PROTO_WS:
 		case PROTO_TCP:
 		case PROTO_TCP:
-		/* on tcp just use the "main address", we don't really now the
+		/* on tcp just use the "main address", we don't really know the
 		 * sending address (we can find it out, but we'll need also to see
 		 * sending address (we can find it out, but we'll need also to see
 		 * if we listen on it, and if yes on which port -> too complicated*/
 		 * if we listen on it, and if yes on which port -> too complicated*/
 			switch(to->s.sa_family){
 			switch(to->s.sa_family){

+ 2 - 2
src/core/resolve.c

@@ -1388,9 +1388,9 @@ end:
  *         tried      - bitmap used to keep track of the already tried records
  *         tried      - bitmap used to keep track of the already tried records
  *                      (no more then sizeof(tried)*8 valid records are
  *                      (no more then sizeof(tried)*8 valid records are
  *                      ever walked
  *                      ever walked
- *         srv_name   - if succesfull, it will be set to the selected record
+ *         srv_name   - if successful, it will be set to the selected record
  *                      srv name (naptr repl.)
  *                      srv name (naptr repl.)
- *         proto      - if succesfull it will be set to the selected record
+ *         proto      - if successful it will be set to the selected record
  *                      protocol
  *                      protocol
  * returns  0 if no more records found or a pointer to the selected record
  * returns  0 if no more records found or a pointer to the selected record
  *  and sets  protocol and srv_name
  *  and sets  protocol and srv_name

+ 5 - 5
src/core/tcp_main.c

@@ -4301,7 +4301,7 @@ static inline int handle_new_connect(struct socket_info* si)
 					cfg_get(tcp, tcp_cfg, max_connections));
 					cfg_get(tcp, tcp_cfg, max_connections));
 		tcp_safe_close(new_sock);
 		tcp_safe_close(new_sock);
 		TCP_STATS_LOCAL_REJECT();
 		TCP_STATS_LOCAL_REJECT();
-		return 1; /* success, because the accept was succesfull */
+		return 1; /* success, because the accept was successful */
 	}
 	}
 	if (unlikely(si->proto==PROTO_TLS)) {
 	if (unlikely(si->proto==PROTO_TLS)) {
 		if (unlikely(*tls_connections_no>=cfg_get(tcp, tcp_cfg, max_tls_connections))){
 		if (unlikely(*tls_connections_no>=cfg_get(tcp, tcp_cfg, max_tls_connections))){
@@ -4310,13 +4310,13 @@ static inline int handle_new_connect(struct socket_info* si)
 					cfg_get(tcp, tcp_cfg, max_tls_connections));
 					cfg_get(tcp, tcp_cfg, max_tls_connections));
 			tcp_safe_close(new_sock);
 			tcp_safe_close(new_sock);
 			TCP_STATS_LOCAL_REJECT();
 			TCP_STATS_LOCAL_REJECT();
-			return 1; /* success, because the accept was succesfull */
+			return 1; /* success, because the accept was successful */
 		}
 		}
 	}
 	}
 	if (unlikely(init_sock_opt_accept(new_sock)<0)){
 	if (unlikely(init_sock_opt_accept(new_sock)<0)){
 		LM_ERR("init_sock_opt failed\n");
 		LM_ERR("init_sock_opt failed\n");
 		tcp_safe_close(new_sock);
 		tcp_safe_close(new_sock);
-		return 1; /* success, because the accept was succesfull */
+		return 1; /* success, because the accept was successful */
 	}
 	}
 	(*tcp_connections_no)++;
 	(*tcp_connections_no)++;
 	if (unlikely(si->proto==PROTO_TLS))
 	if (unlikely(si->proto==PROTO_TLS))
@@ -4352,7 +4352,7 @@ static inline int handle_new_connect(struct socket_info* si)
 				LM_ERR("duplicated connection by local and remote addresses\n");
 				LM_ERR("duplicated connection by local and remote addresses\n");
 				_tcpconn_free(tcpconn);
 				_tcpconn_free(tcpconn);
 				tcp_safe_close(new_sock);
 				tcp_safe_close(new_sock);
-				return 1; /* success, because the accept was succesfull */
+				return 1; /* success, because the accept was successful */
 			}
 			}
 		}
 		}
 		tcpconn->flags|=F_CONN_PASSIVE;
 		tcpconn->flags|=F_CONN_PASSIVE;
@@ -4394,7 +4394,7 @@ static inline int handle_new_connect(struct socket_info* si)
 		if (unlikely(si->proto==PROTO_TLS))
 		if (unlikely(si->proto==PROTO_TLS))
 			(*tls_connections_no)--;
 			(*tls_connections_no)--;
 	}
 	}
-	return 1; /* accept() was succesfull */
+	return 1; /* accept() was successful */
 }
 }