Small modifications on fsock to work with CGRateS