Fix to pthread warnings
Fix to pthread warnings

Fixed pthread warnings by passing appropiate variables. At this
point code compiling without any warnings but core dumped on
running server

shankyrox/SP15,shankyrox/SP15