which suggested bufchain_prefix() was finding an improperly
initialised bufchain structure. Looking at the code, this may indeed
have been able to happen, since the bufchain in a SOCKDATA_DORMANT
channel was not initialised until CHANNEL_OPEN_CONFIRMATION was
received. This seems utterly daft, so I now call bufchain_init()
when the channel structure is actually created. With any luck the
crash will mystically disappear now (I wasn't able to reproduce it
myself).
git-svn-id: svn://svn.tartarus.org/sgt/putty@1735
cda61777-01e9-0310-a592-
d414129be87e
c->type = CHAN_SOCKDATA;
c->v.v2.remwindow = ssh2_pkt_getuint32();
c->v.v2.remmaxpkt = ssh2_pkt_getuint32();
- bufchain_init(&c->v.v2.outbuffer);
if (c->u.pfd.s)
pfd_confirm(c->u.pfd.s);
if (c->closes) {
c->closes = 0;
c->type = CHAN_SOCKDATA_DORMANT;/* identify channel type */
c->u.pfd.s = s;
+ bufchain_init(&c->v.v2.outbuffer);
add234(ssh_channels, c);
}
return c;