Cleaned up some debug output.

This commit is contained in:
gardners 2012-03-27 19:50:31 +10:30
parent 8bd0153b0f
commit 5cc3283646
2 changed files with 3 additions and 7 deletions

View File

@ -89,7 +89,7 @@ int overlay_mdp_get_fds(struct pollfd *fds,int *fdcount,int fdmax)
if ((*fdcount)>=fdmax) return -1;
if (mdp_abstract_socket>-1)
{
if (1||debug&DEBUG_IO) {
if (debug&DEBUG_IO) {
fprintf(stderr,"MDP abstract name space socket is poll() slot #%d (fd %d)\n",
*fdcount,mdp_abstract_socket);
}
@ -100,7 +100,7 @@ int overlay_mdp_get_fds(struct pollfd *fds,int *fdcount,int fdmax)
if ((*fdcount)>=fdmax) return -1;
if (mdp_named_socket>-1)
{
if (1||debug&DEBUG_IO) {
if (debug&DEBUG_IO) {
fprintf(stderr,"MDP named unix domain socket is poll() slot #%d (fd %d)\n",
*fdcount,mdp_named_socket);
}
@ -259,8 +259,6 @@ int overlay_mdp_process_bind_request(int sock,overlay_mdp_frame *mdp,
mdp_bindings_socket_name_lengths[free]=recvaddrlen-2;
memcpy(&mdp_bindings_sockets[free][0],&recvaddr->sun_path[0],
mdp_bindings_socket_name_lengths[free]);
fprintf(stderr,"Port bound\n");
WHY("Need to return binding information to client");
return overlay_mdp_reply_ok(sock,recvaddr,recvaddrlen,"Port bound");
}
@ -271,6 +269,7 @@ int overlay_saw_mdp_containing_frame(int interface,overlay_frame *f,long long no
int overlay_saw_mdp_frame(int interface, overlay_mdp_frame *mdp,long long now)
{
printf("mdp frame type=0x%x\n",mdp->packetTypeAndFlags);
return WHY("Not implemented");
}
@ -334,8 +333,6 @@ int overlay_mdp_poll()
recvaddr,&recvaddrlen);
recvaddr_un=(struct sockaddr_un *)recvaddr;
dump("mdp frame",buffer,len);
if (len>0) {
/* Look at overlay_mdp_frame we have received */
overlay_mdp_frame *mdp=(overlay_mdp_frame *)&buffer[0];

View File

@ -269,7 +269,6 @@ int overlay_rhizome_add_advertisements(int interface_number,overlay_buffer *e)
ob_setbyte(e,rfs_offset+1,(rfs_value-250)&0xff);
e->length++;
}
printf("Final packet size = %d\n",e->length);
return 0;
}