diff options
author | pjd <pjd@FreeBSD.org> | 2011-02-02 15:42:00 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2011-02-02 15:42:00 +0000 |
commit | 3acb629cd228ce6366df06b502aea7ca95055b91 (patch) | |
tree | 9223d8207fa5991396838925457e2a191fb13707 /sbin/hastd/proto_uds.c | |
parent | fe04ca41978603dd92e6ce84f2f087885c567429 (diff) | |
download | FreeBSD-src-3acb629cd228ce6366df06b502aea7ca95055b91.zip FreeBSD-src-3acb629cd228ce6366df06b502aea7ca95055b91.tar.gz |
Allow to specify connection timeout by the caller.
MFC after: 1 week
Diffstat (limited to 'sbin/hastd/proto_uds.c')
-rw-r--r-- | sbin/hastd/proto_uds.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/hastd/proto_uds.c b/sbin/hastd/proto_uds.c index 262d0c0..58b968e 100644 --- a/sbin/hastd/proto_uds.c +++ b/sbin/hastd/proto_uds.c @@ -123,7 +123,7 @@ uds_client(const char *addr, void **ctxp) } static int -uds_connect(void *ctx) +uds_connect(void *ctx, int timeout) { struct uds_ctx *uctx = ctx; @@ -131,6 +131,7 @@ uds_connect(void *ctx) PJDLOG_ASSERT(uctx->uc_magic == UDS_CTX_MAGIC); PJDLOG_ASSERT(uctx->uc_side == UDS_SIDE_CLIENT); PJDLOG_ASSERT(uctx->uc_fd >= 0); + PJDLOG_ASSERT(timeout >= 0); if (connect(uctx->uc_fd, (struct sockaddr *)&uctx->uc_sun, sizeof(uctx->uc_sun)) < 0) { |