Prechádzať zdrojové kódy

- xlog buitl by default
- xlog minor 64 bit warnings fixed
- get_out_socket from size fix
- prin_cseq_num fix

Andrei Pelinescu-Onciul 22 rokov pred
rodič
commit
a9cd95b5b7
4 zmenil súbory, kde vykonal 5 pridanie a 4 odobranie
  1. 1 1
      Makefile
  2. 1 0
      TODO
  3. 1 1
      forward.c
  4. 2 2
      modules/tm/t_msgbuilder.c

+ 1 - 1
Makefile

@@ -36,7 +36,7 @@ skip_modules?=
 
 # if not set on the cmd. line or the env, exclude this modules:
 exclude_modules?= 			cpl cpl-c ext extcmd mangler pdt \
-							postgres snmp xlog  \
+							postgres snmp \
 							im radius_acc radius_auth \
 							jabber mysql \
 							auth_radius group_radius uri_radius 

+ 1 - 0
TODO

@@ -16,6 +16,7 @@ x port receive.c pre_script_cb fix from stable
        tcp foo.bar:5063, udp foo.bar:5062, foo2.bar
 
 release:
+- print_cseq_num max. size fix.
 x backport: tcp conn id fix to stable + destroy_tcp 
 x backport: acc mem. leak fixes
 x backport: dns mem. leak fixes (resolve.[ch])

+ 1 - 1
forward.c

@@ -106,7 +106,7 @@ struct socket_info* get_out_socket(union sockaddr_union* to, int proto)
 				strerror(errno));
 		goto error;
 	}
-	len=sockaddru_len(from);
+	len=sizeof(from);
 	if (getsockname(temp_sock, &from.s, &len)==-1) {
 		LOG(L_ERR, "ERROR: get_out_socket: getsockname failed: %s\n",
 				strerror(errno));

+ 2 - 2
modules/tm/t_msgbuilder.c

@@ -209,12 +209,12 @@ static inline int print_content_length(str* dest, str* body)
  */
 static inline int print_cseq_num(str* _s, dlg_t* _d)
 {
-	static char cseq[10];
+	static char cseq[INT2STR_MAX_LEN];
 	char* tmp;
 	int len;
 
 	tmp = int2str(_d->loc_seq.value, &len);
-	if (len >= sizeof(cseq)) {
+	if (len > sizeof(cseq)) {
 		LOG(L_ERR, "print_cseq_num: cseq too big\n");
 		return -1;
 	}