mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
remove dead code
This commit is contained in:
parent
94cfaecfb1
commit
c704b7ff4f
1 changed files with 0 additions and 83 deletions
|
@ -998,89 +998,6 @@ cursesListenOnSocket( void* closure, int newSock
|
|||
#endif
|
||||
} /* cursesListenOnSocket */
|
||||
|
||||
#ifdef USE_GLIBLOOP
|
||||
#if 0
|
||||
static gboolean
|
||||
data_socket_proc( GIOChannel* source, GIOCondition condition, gpointer data )
|
||||
{
|
||||
gboolean keep = TRUE;
|
||||
if ( 0 != ((G_IO_HUP|G_IO_ERR|G_IO_NVAL) & condition) ) {
|
||||
XP_LOGF( "%s: got error condition; returning FALSE", __func__ );
|
||||
keep = FALSE;
|
||||
} else if ( 0 != (G_IO_IN & condition) ) {
|
||||
CursesAppGlobals* globals = (CursesAppGlobals*)data;
|
||||
int fd = g_io_channel_unix_get_fd( source );
|
||||
unsigned char buf[1024];
|
||||
int nBytes;
|
||||
// CommsAddrRec addrRec;
|
||||
CommsAddrRec* addrp = NULL;
|
||||
// XP_Bool oneSent = XP_FALSE;
|
||||
|
||||
/* It's a normal data socket */
|
||||
CommsConnType typ;
|
||||
for ( XP_U32 st = 0;
|
||||
addr_iter( &globals->cGlobals.params->addr, &typ, &st ); ) {
|
||||
switch ( typ ) {
|
||||
#ifdef XWFEATURE_RELAY
|
||||
case COMMS_CONN_RELAY:
|
||||
nBytes = linux_relay_receive( &globals->cGlobals, buf,
|
||||
sizeof(buf) );
|
||||
break;
|
||||
#endif
|
||||
#ifdef XWFEATURE_SMS
|
||||
case COMMS_CONN_SMS:
|
||||
XP_ASSERT(0);
|
||||
/* addrp = &addrRec; */
|
||||
/* nBytes = linux_sms_receive( &globals->cGlobals, fd, */
|
||||
/* buf, sizeof(buf), addrp ); */
|
||||
break;
|
||||
#endif
|
||||
#ifdef XWFEATURE_BLUETOOTH
|
||||
case COMMS_CONN_BT:
|
||||
nBytes = linux_bt_receive( fd, buf, sizeof(buf) );
|
||||
break;
|
||||
#endif
|
||||
|
||||
case COMMS_CONN_IP_DIRECT:
|
||||
XP_LOGF( "OOPS: need separate data procs per address type!!" );
|
||||
XP_ASSERT( 0 );
|
||||
break;
|
||||
case COMMS_CONN_NONE:
|
||||
break;
|
||||
|
||||
default:
|
||||
XP_ASSERT( 0 ); /* fired */
|
||||
}
|
||||
}
|
||||
|
||||
if ( nBytes != -1 ) {
|
||||
XWStreamCtxt* inboundS;
|
||||
XP_Bool redraw = XP_FALSE;
|
||||
|
||||
inboundS = stream_from_msgbuf( &globals->cGlobals, buf, nBytes );
|
||||
if ( !!inboundS ) {
|
||||
if ( comms_checkIncomingStream( globals->cGlobals.game.comms,
|
||||
inboundS, addrp ) ) {
|
||||
redraw = server_receiveMessage( globals->cGlobals.game.server,
|
||||
inboundS );
|
||||
}
|
||||
stream_destroy( inboundS );
|
||||
}
|
||||
|
||||
/* if there's something to draw resulting from the
|
||||
message, we need to give the main loop time to reflect
|
||||
that on the screen before giving the server another
|
||||
shot. So just call the idle proc. */
|
||||
if ( redraw ) {
|
||||
curses_util_requestTime( globals->cGlobals.util );
|
||||
}
|
||||
}
|
||||
}
|
||||
return keep;
|
||||
} /* data_socket_proc */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static void
|
||||
curses_socket_added( void* closure, int newSock, GIOFunc func )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue