actually get the host's name for the code that needs it (bug #4569)
authorKevin P. Fleming <kpfleming@digium.com>
Fri, 24 Jun 2005 02:56:15 +0000 (02:56 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Fri, 24 Jun 2005 02:56:15 +0000 (02:56 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5998 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_skinny.c

index 6c6d464..7f96e8f 100755 (executable)
@@ -3113,13 +3113,10 @@ static int reload_config(void)
        struct skinny_device *d;
        int oldport = ntohs(bindaddr.sin_port);
 
-#if 0          
-       hp = ast_gethostbyname(ourhost, &ahp);
-       if (!hp) {
+       if (gethostname(ourhost, sizeof(ourhost))) {
                ast_log(LOG_WARNING, "Unable to get hostname, Skinny disabled\n");
                return 0;
        }
-#endif
        cfg = ast_config_load(config);
 
        /* We *must* have a config file otherwise stop immediately */