frs_return_t
FollowStreamDialog::follow_read_stream()
{
    ui->teStreamContent->clear();
    frs_return_t ret;

    client_buffer_count_ = 0;
    server_buffer_count_ = 0;
    client_packet_count_ = 0;
    server_packet_count_ = 0;
    last_packet_ = 0;
    turns_ = 0;

    switch(follow_type_) {

    case FOLLOW_TCP :
        ret = follow_read_tcp_stream();
        break;

    case FOLLOW_UDP :
        ret = follow_read_udp_stream();
        break;

    case FOLLOW_SSL :
        ret = follow_read_ssl_stream();
        break;

    default :
        g_assert_not_reached();
        ret = (frs_return_t)0;
        break;
    }
    ui->teStreamContent->moveCursor(QTextCursor::Start);
    return ret;
}
Esempio n. 2
0
static frs_return_t
follow_read_stream(follow_info_t *follow_info,
		   gboolean (*print_line_fcn_p)(char *, size_t, gboolean, void *),
		   void *arg)
{
	switch(follow_info->follow_type) {

	case FOLLOW_TCP :
		return follow_read_tcp_stream(follow_info, print_line_fcn_p, arg);

	case FOLLOW_UDP :
		return follow_read_udp_stream(follow_info, print_line_fcn_p, arg);

	case FOLLOW_SSL :
		return follow_read_ssl_stream(follow_info, print_line_fcn_p, arg);

	default :
		g_assert_not_reached();
		return 0;
	}
}