Mercurial > hg > freeDiameter
diff tests/testsctp.c @ 1186:56c36d1007b4
Further preparation of the DTLS integration. Some cleanups in the GNUTLS handling.
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Fri, 07 Jun 2013 18:48:34 +0800 |
parents | 4a9f08d6b6ba |
children | f937feb72734 |
line wrap: on
line diff
--- a/tests/testsctp.c Thu Jun 06 19:06:00 2013 +0800 +++ b/tests/testsctp.c Fri Jun 07 18:48:34 2013 +0800 @@ -60,6 +60,7 @@ char buf1[]="abcdef"; char *buf2; size_t sz; + struct iovec iov; struct fd_list eps = FD_LIST_INITIALIZER(eps); uint16_t str; int ev; @@ -103,7 +104,9 @@ srv.cc_socket = accept(sock, NULL, NULL); /* Send a first message */ - CHECK( 0, fd_sctp_sendstr(&srv, 1, (uint8_t *)buf1, sizeof(buf1) ) ); + iov.iov_base = buf1; + iov.iov_len = sizeof(buf1); + CHECK( sizeof(buf1), fd_sctp_sendstrv(&srv, 1, &iov, 1 ) ); CHECK( 0, srv.cc_state); /* Receive this message */ @@ -119,7 +122,7 @@ free(buf2); buf2 = NULL; /* Send in the other direction */ - CHECK( 0, fd_sctp_sendstr(&cli, 2, (uint8_t *)buf1, sizeof(buf1)) ); + CHECK( sizeof(buf1), fd_sctp_sendstrv(&cli, 2, &iov, 1) ); CHECK( 0, cli.cc_state); /* Receive this message */