Introduce reds_stream_set_channel()

This commit is contained in:
Christophe Fergeau 2014-01-06 22:38:44 +01:00
parent 82511418a0
commit 28fa3b1b3f
3 changed files with 14 additions and 3 deletions

View File

@ -1417,9 +1417,9 @@ static void reds_info_new_channel(RedLinkInfo *link, int connection_id)
if (reds_stream_is_ssl(link->stream)) {
reds_stream_set_info_flag(link->stream, SPICE_CHANNEL_EVENT_FLAG_TLS);
}
link->stream->info->connection_id = connection_id;
link->stream->info->type = link->link_mess->channel_type;
link->stream->info->id = link->link_mess->channel_id;
reds_stream_set_channel(link->stream, connection_id,
link->link_mess->channel_type,
link->link_mess->channel_id);
reds_stream_push_channel_event(link->stream, SPICE_CHANNEL_EVENT_INITIALIZED);
}

View File

@ -282,6 +282,15 @@ static void reds_stream_set_socket(RedsStream *stream, int socket)
&stream->info->plen_ext);
}
void reds_stream_set_channel(RedsStream *stream, int connection_id,
int channel_type, int channel_id)
{
stream->info->connection_id = connection_id;
stream->info->type = channel_type;
stream->info->id = channel_id;
}
RedsStream *reds_stream_new(int socket)
{
RedsStream *stream;

View File

@ -81,6 +81,8 @@ void reds_stream_free(RedsStream *s);
void reds_stream_push_channel_event(RedsStream *s, int event);
void reds_stream_remove_watch(RedsStream* s);
void reds_stream_set_channel(RedsStream *stream, int connection_id,
int channel_type, int channel_id);
RedsStream *reds_stream_new(int socket);
bool reds_stream_is_ssl(RedsStream *stream);
RedsStreamSslStatus reds_stream_ssl_accept(RedsStream *stream);