Revision 06bc22e3

View differences:

src/net_helper.c
116 116

  
117 117
int send_to_peer(const struct nodeID *from, struct nodeID *to, const uint8_t *buffer_ptr, int buffer_size)
118 118
{
119
  static struct msghdr msg;
120
  static uint8_t my_hdr;
119
  struct msghdr msg = {0};
120
  uint8_t my_hdr;
121 121
  struct iovec iov[2];
122 122
  int res;
123 123

  
......
149 149
{
150 150
  int res, recv;
151 151
  struct sockaddr_in raddr;
152
  static struct msghdr msg;
153
  static uint8_t my_hdr;
152
  struct msghdr msg = {0};
153
  uint8_t my_hdr;
154 154
  struct iovec iov[2];
155 155

  
156 156
  iov[0].iov_base = &my_hdr;

Also available in: Unified diff