19 changed files with 139 additions and 100 deletions
-
27README.md
-
6include/tr/comm_manager.h
-
2include/tr/connect_entry_point.h
-
3src/Makefile.am
-
34src/cet_accept.c
-
14src/comm_manager.c
-
6src/comm_manager_epoll.c
-
6src/comm_manager_poll.c
-
2src/comm_manager_shutdown_read.c
-
2src/comm_manager_shutdown_write.c
-
10src/connector.c
-
61src/i_comm_manager.c
-
2src/server_bind_tcp.c
-
3src/server_bind_udp.c
-
10testers/Makefile
-
1testers/NOTES.md
-
14testers/testclient.c
-
BINtesters/testset
-
36testers/testset.c
@ -1,34 +0,0 @@ |
|||||
/** |
|
||||
* \file |
|
||||
* |
|
||||
* \author Georg Hopp |
|
||||
* |
|
||||
* \copyright |
|
||||
* Copyright © 2014 Georg Hopp |
|
||||
* |
|
||||
* This program is free software: you can redistribute it and/or modify |
|
||||
* it under the terms of the GNU General Public License as published by |
|
||||
* the Free Software Foundation, either version 3 of the License, or |
|
||||
* (at your option) any later version. |
|
||||
* |
|
||||
* This program is distributed in the hope that it will be useful, |
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
* GNU General Public License for more details. |
|
||||
* |
|
||||
* You should have received a copy of the GNU General Public License |
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
||||
*/ |
|
||||
|
|
||||
#include "trio.h" |
|
||||
|
|
||||
#include "tr/comm_end_point.h" |
|
||||
#include "tr/connect_entry_point.h" |
|
||||
|
|
||||
TR_TcpSocket |
|
||||
TR_cetAccept(TR_ConnEntryPoint cet) |
|
||||
{ |
|
||||
return TR_socketAccept((TR_TcpSocket)((TR_CommEndPoint)cet)->transport); |
|
||||
} |
|
||||
|
|
||||
// vim: set ts=4 sw=4: |
|
||||
@ -0,0 +1 @@ |
|||||
|
The testclient throws a segfault when interruption on a waiting connect. |
||||
@ -0,0 +1,36 @@ |
|||||
|
#include <stdio.h> |
||||
|
|
||||
|
#include "trbase.h" |
||||
|
#include "trdata.h" |
||||
|
|
||||
|
int |
||||
|
main (int argc, char * argv[]) |
||||
|
{ |
||||
|
TR_Set set = TR_new(TR_Set); |
||||
|
|
||||
|
set->free_msgs = 0; |
||||
|
|
||||
|
TR_setAdd(set, "a"); |
||||
|
TR_setAdd(set, "b"); |
||||
|
TR_setAdd(set, "c"); |
||||
|
|
||||
|
TR_iterableForeach(set) { |
||||
|
printf("%s\n", (char *)TR_iterableCurrent(set)); |
||||
|
} |
||||
|
|
||||
|
TR_setDelete(set, "a"); |
||||
|
TR_setDelete(set, "b"); |
||||
|
TR_setAdd(set, "b"); |
||||
|
TR_setAdd(set, "a"); |
||||
|
|
||||
|
TR_iterableForeach(set) { |
||||
|
printf("%s\n", (char *)TR_iterableCurrent(set)); |
||||
|
} |
||||
|
|
||||
|
TR_delete(set); |
||||
|
TR_cleanup(); |
||||
|
|
||||
|
return 0; |
||||
|
} |
||||
|
|
||||
|
// vim: set ts=4 sw=4: |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue