Fixed compile errors and implemented getSrvRecords