diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-06-03 20:47:53 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-06-03 20:47:53 +0000 |
commit | ac502d12ad8b762ff920452683888a385b3d03f8 (patch) | |
tree | fc32b1ada632324bc86431dfdaea542ad2f8871e /src/util/network.c | |
parent | d50ff4b0c667247787d42563c6e8898126b71a5a (diff) | |
download | gnunet-ac502d12ad8b762ff920452683888a385b3d03f8.tar.gz gnunet-ac502d12ad8b762ff920452683888a385b3d03f8.zip |
add native setting capability
Diffstat (limited to 'src/util/network.c')
-rw-r--r-- | src/util/network.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/util/network.c b/src/util/network.c index c4fb73049..0b4168034 100644 --- a/src/util/network.c +++ b/src/util/network.c | |||
@@ -723,6 +723,21 @@ GNUNET_NETWORK_fdset_copy_native (struct GNUNET_NETWORK_FDSet *to, | |||
723 | to->nsds = nfds; | 723 | to->nsds = nfds; |
724 | } | 724 | } |
725 | 725 | ||
726 | |||
727 | /** | ||
728 | * Set a native fd in a set | ||
729 | * | ||
730 | * @param to destination | ||
731 | * @param nfd native FD to set | ||
732 | */ | ||
733 | void GNUNET_NETWORK_fdset_set_native (struct GNUNET_NETWORK_FDSet *to, | ||
734 | int nfd) | ||
735 | { | ||
736 | FD_SET (nfd, &to->sds); | ||
737 | to->nsds = GNUNET_MAX (nfd + 1, to->nsds); | ||
738 | } | ||
739 | |||
740 | |||
726 | /** | 741 | /** |
727 | * Add a file handle to the fd set | 742 | * Add a file handle to the fd set |
728 | * @param fds fd set | 743 | * @param fds fd set |