Commit 4faf9634 authored by Grégoire Henry's avatar Grégoire Henry

Factorisation de code et gestion des erreurs.

  - Fusion de kernel_listen dans kernel_read.
  - Fusion de monitor_kernel_routes dans filter_kernel_routes.
  - En cas d'erreur d'entree/sortie on ferme les sockets.
    - nl_command est rouverte au besoin
    - nl_listen doit etre rouverte a l'aide de kernel_setup_socket(1)
parent ec19de91
......@@ -427,6 +427,7 @@ main(int argc, char **argv)
if(timeval_compare(&tv, &now) > 0) {
timeval_minus(&tv, &tv, &now);
FD_SET(protocol_socket, &readfds);
if(kernel_socket < 0) kernel_setup_socket(1);
if(kernel_socket >= 0)
FD_SET(kernel_socket, &readfds);
rc = select(MAX(protocol_socket, kernel_socket) + 1,
......
This diff is collapsed.
......@@ -56,7 +56,7 @@ check_xroutes()
int i, j, n, change;
struct kernel_route routes[120];
debugf("Checking kernel routes.\n");
debugf("\nChecking kernel routes.\n");
n = -1;
for(i = 0; i < numxroutes; i++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment