Selaa lähdekoodia

- default config fixed (removed force_send_socket)
- more verbose error messages for bad force_send_socket parameters

Andrei Pelinescu-Onciul 20 vuotta sitten
vanhempi
commit
fbc15f8cbc
2 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 1 6
      etc/ser.cfg
  2. 6 1
      route.c

+ 1 - 6
etc/ser.cfg

@@ -76,16 +76,11 @@ route{
 		sl_send_reply("483","Too Many Hops");
 		sl_send_reply("483","Too Many Hops");
 		break;
 		break;
 	};
 	};
-	if (msg:len >=  max_len ) {
+	if (msg:len >=  2048 ) {
 		sl_send_reply("513", "Message too big");
 		sl_send_reply("513", "Message too big");
 		break;
 		break;
 	};
 	};
 	
 	
-	if (src_ip==193.175.135.0/24){
-		force_send_socket(smaug:5080);
-		forward(193.175.135.179);
-		break;
-	}
 
 
 	# we record-route all messages -- to make sure that
 	# we record-route all messages -- to make sure that
 	# subsequent messages will go through our proxy; that's
 	# subsequent messages will go through our proxy; that's

+ 6 - 1
route.c

@@ -255,7 +255,12 @@ static int fix_actions(struct action* a)
 					return E_BUG;
 					return E_BUG;
 				}
 				}
 				he=resolvehost(((struct socket_id*)t->p1.data)->name);
 				he=resolvehost(((struct socket_id*)t->p1.data)->name);
-				if (he==0) return E_BAD_ADDRESS;
+				if (he==0){
+					LOG(L_ERR, "ERROR: fix_actions: force_send_socket:"
+								" could not resolve %s\n",
+								((struct socket_id*)t->p1.data)->name);
+					return E_BAD_ADDRESS;
+				}
 				hostent2ip_addr(&ip, he, 0);
 				hostent2ip_addr(&ip, he, 0);
 				si=find_si(&ip, ((struct socket_id*)t->p1.data)->port,
 				si=find_si(&ip, ((struct socket_id*)t->p1.data)->port,
 								((struct socket_id*)t->p1.data)->proto);
 								((struct socket_id*)t->p1.data)->proto);