- if( p_input == NULL )
- {
- /* Wait a bit */
- msleep( INTF_IDLE_SLEEP );
- continue;
- }
-
- /*
- * We now have an input
- */
-
- /* Initialize file descriptor set and timeout (0.5s) */
- /* FIXME: arbitrary tick */
- struct pollfd ufd = { .fd = i_socket, .events = POLLIN, };
-
- if( b_master )
- {
- struct sockaddr_storage from;
- mtime_t i_master_system;
- mtime_t i_client_system;
- mtime_t i_date;
- int i_struct_size, i_read, i_ret;
-
- /* Don't block */
- i_ret = poll( &ufd, 1, i_timeout );
- if( i_ret <= 0 ) continue;
-
- /* We received something */
- i_struct_size = sizeof( from );
- i_read = recvfrom( i_socket, p_data, MAX_MSG_LENGTH, 0,
- (struct sockaddr*)&from,
- (unsigned int *)&i_struct_size );