func: static void *accept_thread(void *ignore) int as ; socklen_t sinlen ; struct skinnysession * s ; sinlen = sizeof ( sin ); as = accept ( skinnysock , ( struct sockaddr * ) & sin , & sinlen ); if ( as < 0 )  if ( ast_atomic_fetchadd_int ( & unauth_sessions , + 1 ) >= auth_limit )  if ( ! ( s = ast_calloc ( 1 , sizeof ( struct skinnysession ) ) ) )  memcpy ( & s -> sin , & sin , sizeof ( sin ) ); s -> fd = as; if ( time ( & s -> start ) == - 1 )  destroy_session ( s ); static void destroy_session(struct skinnysession *s) struct skinnysession * cur ; if ( cur == s )  if ( s -> fd > - 1 )  close ( s -> fd ); 