X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=lib%2Freconnect.c;h=0333d9622c3e5b940a7e72f2226db972035de904;hb=51c14ddd8df9617e641748a98ac52b78fd19290a;hp=7737fcf7e7677f0bb83d658e24582bfddf74bcbf;hpb=f125905cdd3dc0339ad968c0a70128807884b400;p=sliver-openvswitch.git diff --git a/lib/reconnect.c b/lib/reconnect.c index 7737fcf7e..0333d9622 100644 --- a/lib/reconnect.c +++ b/lib/reconnect.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010 Nicira Networks. + * Copyright (c) 2008, 2009, 2010 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,8 +54,6 @@ struct reconnect { bool passive; enum vlog_level info; /* Used for informational messages. */ - uint8_t dscp; - /* State. */ enum state state; long long int state_entered; @@ -188,14 +186,6 @@ reconnect_get_probe_interval(const struct reconnect *fsm) return fsm->probe_interval; } -/* Returns the dscp value used for establishing the connection between the - * manager and the database. */ -uint8_t -reconnect_get_dscp(const struct reconnect *fsm) -{ - return fsm->dscp; -} - /* Limits the maximum number of times that 'fsm' will ask the client to try to * reconnect to 'max_tries'. UINT_MAX (the default) means an unlimited number * of tries. @@ -255,14 +245,6 @@ reconnect_set_probe_interval(struct reconnect *fsm, int probe_interval) fsm->probe_interval = probe_interval ? MAX(1000, probe_interval) : 0; } -/* Sets the dscp value to be used for establishing a connection between the - * manager and the database. */ -void -reconnect_set_dscp(struct reconnect *fsm, uint8_t dscp) -{ - fsm->dscp = dscp; -} - /* Returns true if 'fsm' is in passive mode, false if 'fsm' is in active mode * (the default). */ bool @@ -541,7 +523,10 @@ reconnect_deadline__(const struct reconnect *fsm) return LLONG_MAX; case S_IDLE: - return fsm->state_entered + fsm->probe_interval; + if (fsm->probe_interval) { + return fsm->state_entered + fsm->probe_interval; + } + return LLONG_MAX; case S_RECONNECT: return fsm->state_entered;