while (datalen > 0) { if (ssh->frozen)
while (bufchain_size(&ssh->queued_incoming_data) > 0 || datalen > 0) { if (ssh->frozen) {
static void ssh_gotdata(Ssh ssh, unsigned char *data, int datalen){    crBegin(ssh->ssh_gotdata_crstate);    /*     * To begin with, feed the characters one by one to the     * protocol initialisation / selection function do_ssh_init().     * When that returns 0, we're done with the initial greeting     * exchange and can move on to packet discipline.     */    while (1) {	int ret;		       /* need not be kept across crReturn */	if (datalen == 0)	    crReturnV;		       /* more data please */	ret = do_ssh_init(ssh, *data);	data++;	datalen--;	if (ret == 0)	    break;    }    /*     * We emerge from that loop when the initial negotiation is     * over and we have selected an s_rdpkt function. Now pass     * everything to s_rdpkt, and then pass the resulting packets     * to the proper protocol handler.     */    if (datalen == 0)	crReturnV;    /*     * Process queued data if there is any.     */    ssh_process_queued_incoming_data(ssh);    while (1) {	while (datalen > 0) {	    if (ssh->frozen)		ssh_queue_incoming_data(ssh, &data, &datalen);	    ssh_process_incoming_data(ssh, &data, &datalen);	    if (ssh->state == SSH_STATE_CLOSED)		return;	}	crReturnV;    }    crFinishV;}