Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cellframe/libdap-stream
1 result
Show changes
Commits on Source (7)
......@@ -125,7 +125,7 @@ int dap_stream_init( bool a_dump_packet_headers)
bKeepaliveLoopQuitSignal = false;
pthread_mutex_init( &s_mutex_keepalive_list, NULL );
pthread_create( &keepalive_thread, NULL, stream_loop, NULL );
//pthread_create( &keepalive_thread, NULL, stream_loop, NULL );
log_it(L_NOTICE,"Init streaming module");
......@@ -410,7 +410,7 @@ static void keepalive_cb (EV_P_ ev_timer *w, int revents)
static void keepalive_cb( void )
{
dap_stream_t *l_stream, *tmp;
return;
pthread_mutex_lock( &s_mutex_keepalive_list );
DL_FOREACH_SAFE( s_stream_keepalive_list, l_stream, tmp ) {
if ( l_stream->keepalive_passed < STREAM_KEEPALIVE_PASSES ) {
......@@ -435,7 +435,7 @@ static void keepalive_cb( void )
* @param sid Stream instance
*/
void start_keepalive( dap_stream_t *sid ) {
return;
// keepalive_loop = EV_DEFAULT;
// sid->keepalive_watcher.data = sid;
// ev_timer_init (&sid->keepalive_watcher, keepalive_cb, STREAM_KEEPALIVE_TIMEOUT, STREAM_KEEPALIVE_TIMEOUT);
......@@ -650,7 +650,7 @@ void stream_dap_data_write(dap_client_remote_t* a_client , void * arg){
size_t i;
(void) arg;
bool ready_to_write=false;
log_it(L_DEBUG,"Process channels data output (%u channels)", DAP_STREAM(a_client )->channel_count );
//log_it(L_DEBUG,"Process channels data output (%u channels)", DAP_STREAM(a_client )->channel_count );
for(i=0;i<DAP_STREAM(a_client )->channel_count; i++){
dap_stream_ch_t * ch = DAP_STREAM(a_client )->channel[i];
......@@ -671,7 +671,7 @@ void stream_dap_data_write(dap_client_remote_t* a_client , void * arg){
dap_client_ready_to_write(sh,ready_to_write);*/
//log_it(L_ERROR,"No stream_data_write_callback is defined");
log_it(L_DEBUG,"stream_dap_data_write ok");
//log_it(L_DEBUG,"stream_dap_data_write ok");
}
/**
......
......@@ -148,15 +148,18 @@ size_t dap_stream_pkt_write(dap_stream_t * a_stream, const void * a_data, size_t
if(a_stream->conn_udp){
ret+=dap_udp_client_write(a_stream->conn,&pkt_hdr,sizeof(pkt_hdr));
ret+=dap_udp_client_write(a_stream->conn,a_stream->buf,pkt_hdr.size);
dap_client_remote_ready_to_write(a_stream->conn, true);
}
else if(a_stream->conn){
ret+=dap_client_remote_write(a_stream->conn,&pkt_hdr,sizeof(pkt_hdr));
ret+=dap_client_remote_write(a_stream->conn,a_stream->buf,pkt_hdr.size);
dap_client_remote_ready_to_write(a_stream->conn, true);
}
else if(a_stream->events_socket) {
ret += dap_events_socket_write(a_stream->events_socket, &pkt_hdr, sizeof(pkt_hdr));
ret += dap_events_socket_write(a_stream->events_socket, a_stream->buf, pkt_hdr.size);
}
dap_events_socket_set_writable(a_stream->events_socket, true);
}
return ret;
}
......