Skip to content
Snippets Groups Projects
utils.c 25.5 KiB
Newer Older
  • Learn to ignore specific revisions
  • 		if (ts)
    			pthread_setspecific(ts->key, *buf);
    
    		/* va_end() and va_start() must be done before calling
    		 * vsnprintf() again. */
    		return AST_DYNSTR_BUILD_RETRY;
    	}
    
    	return res;
    }
    
    
    void ast_enable_packet_fragmentation(int sock)
    {
    
    #if defined(HAVE_IP_MTU_DISCOVER)
    
    	int val = IP_PMTUDISC_DONT;
    	
    	if (setsockopt(sock, IPPROTO_IP, IP_MTU_DISCOVER, &val, sizeof(val)))
    		ast_log(LOG_WARNING, "Unable to disable PMTU discovery. Large UDP packets may fail to be delivered when sent from this socket.\n");
    
    #endif /* HAVE_IP_MTU_DISCOVER */