Commit 36f192e8 authored by Robert Schmidt's avatar Robert Schmidt

Fix test of socket_link.c after interface change

link_send_packet() has been extended to use for multiple protocols (added UDP,
SCTP after TCP). The test was not update, though, which is fixed in this
commit.
parent 9fd4b452
......@@ -602,8 +602,8 @@ int main(void)
*/
sleep(1);
printf("... done\n");
if (link_send_packet(l, "hello\n", 6+1) ||
link_send_packet(l, "world\n", 6+1)) return 1;
if (link_send_packet(l, "hello\n", 6+1, NULL, 0) ||
link_send_packet(l, "world\n", 6+1, NULL, 0)) return 1;
if (link_receive_packet(l, &data, &size)) return 1; printf("%s", (char *)data); free(data);
if (link_receive_packet(l, &data, &size)) return 1; printf("%s", (char *)data); free(data);
printf("stats:\n");
......@@ -631,8 +631,8 @@ int main(void)
printf("link is up\n");
if (link_receive_packet(l, &data, &size)) return 1; printf("%s", (char *)data); free(data);
if (link_receive_packet(l, &data, &size)) return 1; printf("%s", (char *)data); free(data);
if (link_send_packet(l, "bye\n", 4+1) ||
link_send_packet(l, "server\n", 7+1)) return 1;
if (link_send_packet(l, "bye\n", 4+1, NULL, 0) ||
link_send_packet(l, "server\n", 7+1, NULL, 0)) return 1;
printf("stats:\n");
printf(" sent packets %"PRIu64"\n", l->packets_sent);
printf(" sent bytes %"PRIu64"\n", l->bytes_sent);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment