- struct evbuffer_iovec vec;
- if (evbuffer_reserve_space(evb, SWIFT_MAX_RECV_DGRAM_SIZE, &vec, 1) < 0) {
- print_error("error on evbuffer_reserve_space");
- return 0;
- }
- struct iovec iov[1];
+ int count = addr.addr->count;
+ struct evbuffer_iovec vec[count];
+ for (int i=0; i<count; ++i) {
+ if (evbuffer_reserve_space(evb[i], SWIFT_MAX_RECV_DGRAM_SIZE, &vec[i], 1) < 0) {
+ print_error("error on evbuffer_reserve_space");
+ return 0;
+ }
+ }
+ struct iovec iov[count];