add: unsigned int  available; str           buf; struct peer   *p;  LOG(L_INFO,"INFO:destroy_msg_queue: max_queued_size  = %u bytes\n", max_queued_size); LOG(L_INFO,"INFO:destroy_msg_queue: max_queued_units = %u \n", max_queued_units); destroy_locks( msg_lock, 1);   while (ioctl(msg_pipe[0],FIONREAD,&available) && available>=sizeof(struct queue_unit) ) { get_from_queue( &buf, &p); DBG("DEBUG:destroy_msg_queue: dumping unused mesage from queue\n"); shm_free( buf.s ); }
context: void destroy_msg_queue(){	close(msg_pipe[0]);	close(msg_pipe[1]);}