bufchain_clear(&p->pending_oob_output_data);
void proxy_activate (Proxy_Socket p){    void *data;    int len;    p->state = PROXY_STATE_ACTIVE;    /* let's try to keep extra receive events from coming through */    sk_set_frozen(p->sub_socket, 1);    /* send buffered OOB writes */    while (bufchain_size(&p->pending_oob_output_data) > 0) {	bufchain_prefix(&p->pending_oob_output_data, &data, &len);	sk_write_oob(p->sub_socket, data, len);	bufchain_consume(&p->pending_oob_output_data, len);    }    bufchain_clear(&p->pending_oob_output_data);    /* send buffered normal writes */    while (bufchain_size(&p->pending_output_data) > 0) {	bufchain_prefix(&p->pending_output_data, &data, &len);	sk_write(p->sub_socket, data, len);	bufchain_consume(&p->pending_output_data, len);    }    bufchain_clear(&p->pending_output_data);    /* if we were asked to flush the output during     * the proxy negotiation process, do so now.     */    if (p->pending_flush) sk_flush(p->sub_socket);    /* forward buffered recv data to the backend */    while (bufchain_size(&p->pending_input_data) > 0) {	bufchain_prefix(&p->pending_input_data, &data, &len);	plug_receive(p->plug, 0, data, len);	bufchain_consume(&p->pending_input_data, len);    }    bufchain_clear(&p->pending_input_data);    /* now set the underlying socket to whatever freeze state they wanted */    sk_set_frozen(p->sub_socket, p->freeze);}