If asterisk is started with progname of 'rasterisk' assume its a remote
authorJames Golovich <james@gnuinter.net>
Sat, 20 Mar 2004 07:26:54 +0000 (07:26 +0000)
committerJames Golovich <james@gnuinter.net>
Sat, 20 Mar 2004 07:26:54 +0000 (07:26 +0000)
console (bug 842)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2491 65c4cc65-6c06-0410-ace0-fbb531ad65f3

asterisk.c

index 7adb027..9cff2c7 100755 (executable)
@@ -1264,6 +1264,11 @@ int main(int argc, char *argv[])
                _argv[x] = argv[x];
        _argv[x] = NULL;
 
                _argv[x] = argv[x];
        _argv[x] = NULL;
 
+       /* if the progname is rasterisk consider it a remote console */
+       if ( argv[0] && (strstr(argv[0], "rasterisk")) != NULL)  {
+               option_remote++;
+               option_nofork++;
+       }
        if (gethostname(hostname, sizeof(hostname)))
                strncpy(hostname, "<Unknown>", sizeof(hostname)-1);
        mainpid = getpid();
        if (gethostname(hostname, sizeof(hostname)))
                strncpy(hostname, "<Unknown>", sizeof(hostname)-1);
        mainpid = getpid();