Show More
@@ -452,19 +452,19 b' class sshv1peer(wireproto.wirepeer):' | |||
|
452 | 452 | |
|
453 | 453 | def _call(self, cmd, **args): |
|
454 | 454 | self._callstream(cmd, **args) |
|
455 |
return self._re |
|
|
455 | return self._readframed() | |
|
456 | 456 | |
|
457 | 457 | def _callpush(self, cmd, fp, **args): |
|
458 | 458 | r = self._call(cmd, **args) |
|
459 | 459 | if r: |
|
460 | 460 | return '', r |
|
461 | 461 | for d in iter(lambda: fp.read(4096), ''): |
|
462 |
self._ |
|
|
463 |
self._ |
|
|
464 |
r = self._re |
|
|
462 | self._writeframed(d) | |
|
463 | self._writeframed("", flush=True) | |
|
464 | r = self._readframed() | |
|
465 | 465 | if r: |
|
466 | 466 | return '', r |
|
467 |
return self._re |
|
|
467 | return self._readframed(), '' | |
|
468 | 468 | |
|
469 | 469 | def _calltwowaystream(self, cmd, fp, **args): |
|
470 | 470 | r = self._call(cmd, **args) |
@@ -472,8 +472,8 b' class sshv1peer(wireproto.wirepeer):' | |||
|
472 | 472 | # XXX needs to be made better |
|
473 | 473 | raise error.Abort(_('unexpected remote reply: %s') % r) |
|
474 | 474 | for d in iter(lambda: fp.read(4096), ''): |
|
475 |
self._ |
|
|
476 |
self._ |
|
|
475 | self._writeframed(d) | |
|
476 | self._writeframed("", flush=True) | |
|
477 | 477 | return self._pipei |
|
478 | 478 | |
|
479 | 479 | def _getamount(self): |
@@ -488,10 +488,10 b' class sshv1peer(wireproto.wirepeer):' | |||
|
488 | 488 | except ValueError: |
|
489 | 489 | self._abort(error.ResponseError(_("unexpected response:"), l)) |
|
490 | 490 | |
|
491 |
def _re |
|
|
491 | def _readframed(self): | |
|
492 | 492 | return self._pipei.read(self._getamount()) |
|
493 | 493 | |
|
494 |
def _ |
|
|
494 | def _writeframed(self, data, flush=False): | |
|
495 | 495 | self._pipeo.write("%d\n" % len(data)) |
|
496 | 496 | if data: |
|
497 | 497 | self._pipeo.write(data) |
General Comments 0
You need to be logged in to leave comments.
Login now