mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Various bugfixes etc.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13479 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
835d5caf6b
commit
14e6fa4d7c
6 changed files with 58 additions and 51 deletions
|
@ -56,16 +56,6 @@
|
|||
*/
|
||||
#include "../Tools/gdomap.h"
|
||||
|
||||
/*
|
||||
* Macros to build text to start name server and to give an error
|
||||
* message about it - they include installation path information.
|
||||
*/
|
||||
#define MAKE_GDOMAP_CMD [[GSSystemRootDirectory() \
|
||||
stringByAppendingPathComponent: @"Tools"] \
|
||||
stringByAppendingPathComponent: @"gdomap"]
|
||||
#define MAKE_GDOMAP_ERR [NSString stringWithFormat: \
|
||||
@"check that %@/Tools/gdomap is running", GSSystemRootDirectory()]
|
||||
|
||||
#define stringify_it(X) #X
|
||||
#define make_gdomap_port(X) stringify_it(X)
|
||||
|
||||
|
@ -187,15 +177,23 @@ typedef enum {
|
|||
* Remove our file handle, then either retry or fail.
|
||||
*/
|
||||
[self close];
|
||||
if (state == GSPC_LOPEN)
|
||||
if (launchCmd == nil)
|
||||
{
|
||||
launchCmd = RETAIN([[NSSearchPathForDirectoriesInDomains(
|
||||
GSToolsDirectory, NSSystemDomainMask, YES) objectAtIndex: 0]
|
||||
stringByAppendingPathComponent: @"gdomap"]);
|
||||
}
|
||||
if (state == GSPC_LOPEN && launchCmd != nil)
|
||||
{
|
||||
NSRunLoop *loop = [NSRunLoop currentRunLoop];
|
||||
NSTimer *timer;
|
||||
|
||||
NSLog(@"NSPortNameServer attempting to start gdomap on local host\n"
|
||||
@"This will take a few seconds.\n"
|
||||
@"Trying to launch gdomap from %@ or a machine/operating-system subdirectory.\n"
|
||||
@"It is recommended that you start up gdomap at login time or (better) when\n"
|
||||
@"your computer is started instead.");
|
||||
@"your computer is started instead.",
|
||||
[launchCmd stringByDeletingLastPathComponent]);
|
||||
[NSTask launchedTaskWithLaunchPath: launchCmd arguments: nil];
|
||||
timer = [NSTimer timerWithTimeInterval: 5.0
|
||||
invocation: nil
|
||||
|
@ -548,7 +546,6 @@ typedef enum {
|
|||
serverPort = RETAIN([NSString stringWithCString:
|
||||
make_gdomap_port(GDOMAP_PORT_OVERRIDE)]);
|
||||
#endif
|
||||
launchCmd = RETAIN(MAKE_GDOMAP_CMD);
|
||||
portClass = [GSTcpPort class];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue