Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346229
b: refs/heads/master
c: 92f1495
h: refs/heads/master
i:
  346227: 06b82b9
v: v3
  • Loading branch information
Philipp Reisner committed Nov 9, 2012
1 parent 7062d9e commit 0afc11d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b666dbf819f9157a4afef2094ec961d216d802b5
refs/heads/master: 92f14951c044198306f098e76c56a944cf88867a
16 changes: 4 additions & 12 deletions trunk/drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ static int conn_connect(struct drbd_tconn *tconn)
struct drbd_socket sock, msock;
struct drbd_conf *mdev;
struct net_conf *nc;
int vnr, timeout, try, h, ok;
int vnr, timeout, h, ok;
bool discard_my_data;
enum drbd_state_rv rv;
struct accept_wait_data ad = {
Expand Down Expand Up @@ -912,15 +912,7 @@ static int conn_connect(struct drbd_tconn *tconn)
do {
struct socket *s;

for (try = 0;;) {
/* 3 tries, this should take less than a second! */
s = drbd_try_connect(tconn);
if (s || ++try >= 3)
break;
/* give the other side time to call bind() & listen() */
schedule_timeout_interruptible(HZ / 10);
}

s = drbd_try_connect(tconn);
if (s) {
if (!sock.socket) {
sock.socket = s;
Expand Down Expand Up @@ -949,10 +941,10 @@ static int conn_connect(struct drbd_tconn *tconn)
retry:
s = drbd_wait_for_connect(tconn, &ad);
if (s) {
try = receive_first_packet(tconn, s);
int fp = receive_first_packet(tconn, s);
drbd_socket_okay(&sock.socket);
drbd_socket_okay(&msock.socket);
switch (try) {
switch (fp) {
case P_INITIAL_DATA:
if (sock.socket) {
conn_warn(tconn, "initial packet S crossed\n");
Expand Down

0 comments on commit 0afc11d

Please sign in to comment.