[Spread-users] bunch of log message spread 4.2

gary garycao at sina.com
Tue Mar 12 05:44:57 EDT 2013


I moved my code from spread 4.1 to 4.2 recently. it runs just fine in
spread 4.1 ,but have bunch of log message in 4.2:
--------------------------------------------------------
E_attach_fd: fd 9 with type 1 exists & replaced & activated
E_attach_fd: fd 11 with type 1 exists & replaced & activated
......
E_attach_fd: fd 9 with type 1 exists & replaced & activated
E_attach_fd: fd 11 with type 1 exists & replaced & activated
--------------------------------------------------------
check the spread source code found that it comes from E_attach_fd in
events.c:580.
for( j=0; j < Fd_queue[priority].num_fds; j++ )
{
if( ( Fd_queue[priority].events[j].fd == fd ) && (
Fd_queue[priority].events[j].fd_type == fd_type ) )
{
Fd_queue[priority].events[j].func = func;
Fd_queue[priority].events[j].code = code;
Fd_queue[priority].events[j].data = data;
if ( !(Fd_queue[priority].events[j].active) )
Fd_queue[priority].num_active_fds++;
Fd_queue[priority].events[j].active = TRUE;
Alarm( PRINT,
"E_attach_fd: fd %d with type %d exists & replaced & activated\n", fd,
fd_type );
return( 1 );
}
}
calling from:
--------------------------------------------------------
4.2 code(daemon/session.c:1756):
if( Sessions[ses].num_mess > 0 ) {
E_queue( Sess_badger_TO, mbox, NULL, Badger_timeout );
E_attach_fd( mbox, WRITE_FD, Sess_badger_FD, 0, NULL, LOW_PRIORITY );

}else{
NO_WORK:
E_dequeue( Sess_badger_TO, mbox, NULL );
E_detach_fd( mbox, WRITE_FD );
}
--------------------------------------------------------
4.1 code(daemon/session.c:1754):
if( Sessions[ses].num_mess > 0 ) E_queue( Sess_badger, mbox, NULL,
Badger_timeout );
--------------------------------------------------------

Can I just delete spread 4.2's E_attach_fd and E_detach_fd code?

regards
gary






More information about the Spread-users mailing list