Revision c5922d21 src/net_helper-udp.c

View differences:

src/net_helper-udp.c
299 299
  uint8_t frags;
300 300
} __attribute__((packed));
301 301

  
302
int send_to_peer(const struct nodeID *from,const  struct nodeID *to, const uint8_t *buffer_ptr, int buffer_size)
302
int send_to_peer(const struct nodeID *from, const struct nodeID *to, const uint8_t *buffer_ptr, int buffer_size)
303 303
{
304 304
  struct msghdr msg = {0};
305 305
  static struct my_hdr_t my_hdr;
306 306
  struct iovec iov[2];
307 307
  int res;
308 308

  
309
  if (buffer_size <= 0) return;
309
  if (buffer_size <= 0) return -1;
310 310

  
311 311
  iov[0].iov_base = &my_hdr;
312 312
  iov[0].iov_len = sizeof(struct my_hdr_t);

Also available in: Unified diff