Displaying 20 results from an estimated 52 matches for "optval".
2012 Jan 10
1
error in Recursive
Hi
I need help in the recursive problem. this is my code
#Generate two random Numbers
minval=20
maxval=100
cutoffValue=50
optVal<- function(cutoffValue,minval,maxval)
{
x=runif(2)
x=x*cutoffValue
for( i in 1:2)
{
if(x[i] < 30 || x[i] >60) # checking it falls between the range
{
optVal(cutoffValue,minval,maxval)
}
}
return(x)
}
optVal(40,20,60)
I'm getting Error li...
2002 May 22
0
[PATCH] connect() timeout
...ar 5 19:59:46 2002
+++ openssh-3.2.2p1/sshconnect.c Tue May 21 15:40:06 2002
@@ -222,6 +222,63 @@
return sock;
}
+int
+timeout_connect(int sockfd, const struct sockaddr *serv_addr,
+ socklen_t addrlen, int timeout)
+{
+ fd_set *fdset;
+ struct timeval tv;
+ socklen_t optlen;
+ int fdsetsz, optval, rc;
+
+ if (timeout <= 0)
+ return(connect(sockfd, serv_addr, addrlen));
+
+ if (fcntl(sockfd, F_SETFL, O_NONBLOCK) < 0)
+ return -1;
+
+ rc = connect(sockfd, serv_addr, addrlen);
+ if (rc == 0)
+ return 0;
+ if (errno != EINPROGRESS)
+ return -1;
+
+ fdsetsz = howmany(sockfd+1, NFDBITS)...
2018 Feb 23
6
RFC 8305 Happy Eyeballs in OpenSSH
...tempt [...] recommended value for a
+ * default delay is 250 milliseconds.
+ */
+#define CONNECTION_ATTEMPT_DELAY 250
+
static int
-timeout_connect(int sockfd, const struct sockaddr *serv_addr,
- socklen_t addrlen, int *timeoutp)
+ssh_connect_timeout(struct timeval *tv, int timeout_ms)
{
- int optval = 0;
- socklen_t optlen = sizeof(optval);
+ if (timeout_ms <= 0)
+ return 0;
+ ms_subtract_diff(tv, &timeout_ms);
+ return timeout_ms <= 0;
+}
- /* No timeout: just do a blocking connect() */
- if (*timeoutp <= 0)
- return connect(sockfd, serv_addr, addrlen);
-
- set_nonblock(sockf...
2013 Sep 17
11
[LLVMdev] [RFC] Internal command line options should not be statically initialized.
...egister the option during pass initialization with all the convenient flags and parameters, but refer to a globally defined option storage that enforces the singleton and provides visibility. As long as pass initialization happens before parseCommandLine, usage should be consistent.
Strawman:
cl::optval<bool> MyOption; // Just the storage, no initialization.
MyPass() {
// Only registers an option with the same optval once.
Option cl::registerOpt(MyOption, cl::init(false), cl::Hidden,
cl::desc("Descriptive string..."), );
}
-Andy
2017 Jan 12
3
proposed change to ssh_connect_direct()
On Sat, Jan 7, 2017 at 2:30 PM, Peter Moody <mindrot at hda3.com> wrote:
> so I spent a bit of time looking at this and it seems like the only
> way to go, at least if I want to keep it in ssh_connect_direct(), is
> to use pthreads. further, it seems like getting that accepted is
> something of a long shot:
Sorry, pthreads is a non-starter.
I would have thought that using
2003 Apr 15
0
Connect timeout patch
...e Apr 15 23:06:30 2003
+++ openssh-3.6.1p1/sshconnect.c Tue Apr 15 23:08:28 2003
@@ -212,6 +212,61 @@
return sock;
}
+int
+timeout_connect(int sockfd, const struct sockaddr *serv_addr,
+ socklen_t addrlen, int timeout)
+{
+ fd_set *fdset;
+ struct timeval tv;
+ socklen_t optlen;
+ int fdsetsz, optval, rc;
+
+ if (timeout <= 0)
+ return(connect(sockfd, serv_addr, addrlen));
+
+ if (fcntl(sockfd, F_SETFL, O_NONBLOCK) < 0)
+ return -1;
+
+ rc = connect(sockfd, serv_addr, addrlen);
+ if (rc == 0)
+ return 0;
+ if (errno != EINPROGRESS)
+ return -1;
+
+ fdsetsz = howmany(sockfd+1, NFDBITS)...
2002 Apr 03
1
[PATCH] connect() timeout
...penssh-3.1p1/sshconnect.c.ORIG Tue Mar 5 19:59:46 2002
+++ openssh-3.1p1/sshconnect.c Wed Apr 3 23:33:48 2002
@@ -222,6 +222,64 @@
return sock;
}
+int
+timeout_connect(int sockfd, const struct sockaddr *serv_addr,
+ socklen_t addrlen, int timeout)
+{
+ int rc;
+ fd_set fds;
+
+ int optval = 0;
+ socklen_t optlen = sizeof(optval);
+ struct timeval tv;
+
+
+ if (timeout <= 0)
+ return(connect(sockfd, serv_addr, addrlen));
+
+ if (fcntl(sockfd, F_SETFL, O_NONBLOCK) < 0)
+ {
+ return -1;
+ }
+
+ rc = connect(sockfd, serv_addr, addrlen);
+ if (rc == 0)
+ return 0;
+ if (e...
2002 Oct 17
0
[PATCH] connect() timeout for OpenSSH-3.5p1
...Thu Sep 19 04:05:04 2002
+++ openssh-3.5p1/sshconnect.c Wed Oct 16 14:59:12 2002
@@ -212,6 +212,61 @@
return sock;
}
+int
+timeout_connect(int sockfd, const struct sockaddr *serv_addr,
+ socklen_t addrlen, int timeout)
+{
+ fd_set *fdset;
+ struct timeval tv;
+ socklen_t optlen;
+ int fdsetsz, optval, rc;
+
+ if (timeout <= 0)
+ return(connect(sockfd, serv_addr, addrlen));
+
+ if (fcntl(sockfd, F_SETFL, O_NONBLOCK) < 0)
+ return -1;
+
+ rc = connect(sockfd, serv_addr, addrlen);
+ if (rc == 0)
+ return 0;
+ if (errno != EINPROGRESS)
+ return -1;
+
+ fdsetsz = howmany(sockfd+1, NFDBITS)...
2013 Sep 17
0
[LLVMdev] [RFC] Internal command line options should not be statically initialized.
...uring pass initialization with all the convenient flags and parameters, but refer to a globally defined option storage that enforces the singleton and provides visibility. As long as pass initialization happens before parseCommandLine, usage should be consistent.
>
> Strawman:
>
> cl::optval<bool> MyOption; // Just the storage, no initialization.
>
> MyPass() {
> // Only registers an option with the same optval once.
> Option cl::registerOpt(MyOption, cl::init(false), cl::Hidden,
> cl::desc("Descriptive string..."), );
> }
Gi...
2013 Sep 17
0
[LLVMdev] [RFC] Internal command line options should not be statically initialized.
...itialization with all the convenient flags and parameters, but refer to a
> globally defined option storage that enforces the singleton and provides
> visibility. As long as pass initialization happens before parseCommandLine,
> usage should be consistent.
>
> Strawman:
>
> cl::optval<bool> MyOption; // Just the storage, no initialization.
>
> MyPass() {
> // Only registers an option with the same optval once.
> Option cl::registerOpt(MyOption, cl::init(false), cl::Hidden,
> cl::desc("Descriptive string..."), );
> }...
2013 Sep 17
0
[LLVMdev] [RFC] Internal command line options should not be statically initialized.
...during pass initialization with all the convenient flags and parameters, but refer to a globally defined option storage that enforces the singleton and provides visibility. As long as pass initialization happens before parseCommandLine, usage should be consistent.
>
> Strawman:
>
> cl::optval<bool> MyOption; // Just the storage, no initialization.
>
> MyPass() {
> // Only registers an option with the same optval once.
> Option cl::registerOpt(MyOption, cl::init(false), cl::Hidden,
> cl::desc("Descriptive string..."), );
>...
2013 Sep 17
3
[LLVMdev] [RFC] Internal command line options should not be statically initialized.
...alization with all the convenient flags and parameters, but refer to a globally defined option storage that enforces the singleton and provides visibility. As long as pass initialization happens before parseCommandLine, usage should be consistent.
>>
>> Strawman:
>>
>> cl::optval<bool> MyOption; // Just the storage, no initialization.
>>
>> MyPass() {
>> // Only registers an option with the same optval once.
>> Option cl::registerOpt(MyOption, cl::init(false), cl::Hidden,
>> cl::desc("Descriptive string...&...
2013 Sep 17
0
[LLVMdev] [RFC] Internal command line options should not be statically initialized.
...ialization with all the convenient flags and parameters, but
> refer to a globally defined option storage that enforces the
> singleton and provides visibility. As long as pass initialization
> happens before parseCommandLine, usage should be consistent.
>
> Strawman:
>
> cl::optval<bool> MyOption; // Just the storage, no initialization.
>
> MyPass() {
> // Only registers an option with the same optval once.
> Option cl::registerOpt(MyOption, cl::init(false), cl::Hidden,
> cl::desc("Descriptive string..."), );
> }...
2013 Sep 17
0
[LLVMdev] [RFC] Internal command line options should not be statically initialized.
...during pass initialization with all the convenient flags and parameters, but refer to a globally defined option storage that enforces the singleton and provides visibility. As long as pass initialization happens before parseCommandLine, usage should be consistent.
>
> Strawman:
>
> cl::optval<bool> MyOption; // Just the storage, no initialization.
>
> MyPass() {
> // Only registers an option with the same optval once.
> Option cl::registerOpt(MyOption, cl::init(false), cl::Hidden,
> cl::desc("Descriptive string..."), );
> }...
2013 Sep 17
1
[LLVMdev] [RFC] Internal command line options should not be statically initialized.
...alization with all the convenient flags and parameters, but refer to a globally defined option storage that enforces the singleton and provides visibility. As long as pass initialization happens before parseCommandLine, usage should be consistent.
>>
>> Strawman:
>>
>> cl::optval<bool> MyOption; // Just the storage, no initialization.
>>
>> MyPass() {
>> // Only registers an option with the same optval once.
>> Option cl::registerOpt(MyOption, cl::init(false), cl::Hidden,
>> cl::desc("Descriptive string....
2023 Jun 19
1
[Bridge] [PATCH iproute2-next 1/1] iplink: bridge: Add support for bridge FDB learning limits
...AX_LEARNED_ENTRIES ]\n"
" [ vlan_filtering VLAN_FILTERING ]\n"
" [ vlan_protocol VLAN_PROTOCOL ]\n"
" [ vlan_default_pvid VLAN_DEFAULT_PVID ]\n"
@@ -168,6 +169,14 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
bm.optval |= no_ll_learn_bit;
else
bm.optval &= ~no_ll_learn_bit;
+ } else if (matches(*argv, "fdb_max_learned_entries") == 0) {
+ __u32 fdb_max_learned_entries;
+
+ NEXT_ARG();
+ if (get_u32(&fdb_max_learned_entries, *argv, 0))
+ invarg("invalid fdb_max_learned_entr...
2013 Sep 17
0
[LLVMdev] [RFC] Internal command line options should not be statically initialized.
...all the convenient flags and parameters, but refer to a globally defined option storage that enforces the singleton and provides visibility. As long as pass initialization happens before parseCommandLine, usage should be consistent.
>>>
>>> Strawman:
>>>
>>> cl::optval<bool> MyOption; // Just the storage, no initialization.
>>>
>>> MyPass() {
>>> // Only registers an option with the same optval once.
>>> Option cl::registerOpt(MyOption, cl::init(false), cl::Hidden,
>>> cl::desc("Des...
2002 Jan 26
5
[PATCH] Connect timeout
The attached patch adds a new 'ConnectTimeout' option (man page updated
in patch) to avoid wasting time when the target host is down. I needed that
because I was using rsync/rdist over ssh for massive files update and the
default connect() took too long for my purpose.
The patch was tested on Linux only, but I used a similar one for ssh 1.2.XX
on Linux, Solaris and HP-UX without
2017 Apr 18
2
Can't compile Asterisk on Ubuntu 16
...ber named 'sockopt_params'
cfg.sockopt_params.options[0].optname = pj_TCP_NODELAY();
^
res_pjsip/config_transport.c:574:6: error: 'pjsip_tcp_transport_cfg {aka
struct pjsip_tcp_transport_cfg}' has no member named 'sockopt_params'
cfg.sockopt_params.options[0].optval = &option;
^
res_pjsip/config_transport.c:575:6: error: 'pjsip_tcp_transport_cfg {aka
struct pjsip_tcp_transport_cfg}' has no member named 'sockopt_params'
cfg.sockopt_params.options[0].optlen = sizeof(option);
^
res_pjsip/config_transport.c:576:6: error: ...
2023 Sep 05
1
[Bridge] [PATCH iproute2-next v3] iplink: bridge: Add support for bridge FDB learning limits
...AX_LEARNED_ENTRIES ]\n"
" [ vlan_filtering VLAN_FILTERING ]\n"
" [ vlan_protocol VLAN_PROTOCOL ]\n"
" [ vlan_default_pvid VLAN_DEFAULT_PVID ]\n"
@@ -168,6 +169,14 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
bm.optval |= no_ll_learn_bit;
else
bm.optval &= ~no_ll_learn_bit;
+ } else if (strcmp(*argv, "fdb_max_learned_entries") == 0) {
+ __u32 fdb_max_learned_entries;
+
+ NEXT_ARG();
+ if (get_u32(&fdb_max_learned_entries, *argv, 0))
+ invarg("invalid fdb_max_learned_entri...