]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - client_common.c
Use sideband also for "proceed" handshake.
[paraslash.git] / client_common.c
index eea14fa8d3a461ce9862b38af3c35a8e807e3568..53f7b5a96e524214798e549d755141a5bb48c3ed 100644 (file)
@@ -355,6 +355,18 @@ static void client_post_select(struct sched *s, struct task *t)
                goto out;
        case CL_SENT_CH_RESPONSE: /* read server response */
                {
+               if (ct->use_sideband) {
+                       struct sb_buffer sbb;
+                       ret = recv_sb(ct, &s->rfds, &sbb);
+                       if (ret <= 0)
+                               goto out;
+                       free(sbb.iov.iov_base);
+                       if (sbb.band != SBD_PROCEED)
+                               ret = -E_BAD_BAND;
+                       else
+                               ct->status = CL_RECEIVED_PROCEED;
+                       goto out;
+               }
                ret = client_recv_buffer(ct, &s->rfds, buf, sizeof(buf), &n);
                if (ret < 0 || n == 0)
                        goto out;