Revision 613263e9 streamer.c

View differences:

streamer.c
18 18
#include "loop.h"
19 19
#include "output.h"
20 20

  
21
static const char *my_iface = "eth0";
21
static const char *my_iface = NULL;
22 22
static int port = 6666;
23 23
static int srv_port;
24 24
static const char *srv_ip = "";
......
82 82
{
83 83
  int i;
84 84
  struct nodeID *myID;
85
  char *my_addr = iface_addr(my_iface);
85
  char *my_addr;
86

  
87
  if (my_iface) {
88
    my_addr = iface_addr(my_iface);
89
  } else {
90
    my_addr = default_ip_addr(my_iface);
91
  }
86 92

  
87 93
  if (my_addr == NULL) {
88 94
    fprintf(stderr, "Cannot find network interface %s\n", my_iface);

Also available in: Unified diff