author | zecke <zecke> | 2002-10-04 21:16:03 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-04 21:16:03 (UTC) |
commit | 10048c2dd7f7cd26c582d64b5e255b00b47de304 (patch) (unidiff) | |
tree | 3b2a79d8218efe5f80d1b2e79e77b22cbc27c2ba | |
parent | dc0344e987ba9b386056dd7bab7c5e34922eff5c (diff) | |
download | opie-10048c2dd7f7cd26c582d64b5e255b00b47de304.zip opie-10048c2dd7f7cd26c582d64b5e255b00b47de304.tar.gz opie-10048c2dd7f7cd26c582d64b5e255b00b47de304.tar.bz2 |
Weird for some of you
_OS_LINUX_ does not get defined
so now it's a if !define(_OS_LINUX)
but this means you need to libuuid again
I don't know how to fix that right. I should ask tt
-rw-r--r-- | core/launcher/transferserver.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index a20df2f..f9204ab 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp | |||
@@ -83,36 +83,36 @@ void TransferServer::newConnection( int socket ) | |||
83 | /* | 83 | /* |
84 | * small class in anonymous namespace | 84 | * small class in anonymous namespace |
85 | * to generate a QUUid for us | 85 | * to generate a QUUid for us |
86 | */ | 86 | */ |
87 | namespace { | 87 | namespace { |
88 | struct UidGen { | 88 | struct UidGen { |
89 | QString uuid(); | 89 | QString uuid(); |
90 | }; | 90 | }; |
91 | #if defined(_OS_LINUX_) | 91 | #if !defined(_OS_LINUX_) |
92 | QString UidGen::uuid() { | ||
93 | uuid_t uuid; | ||
94 | uuid_generate( uuid ); | ||
95 | return QUUid( uuid ).toString(); | ||
96 | } | ||
97 | #else | ||
92 | /* | 98 | /* |
93 | * linux got a /proc/sys/kernel/random/uuid file | 99 | * linux got a /proc/sys/kernel/random/uuid file |
94 | * it'll generate the uuids for us | 100 | * it'll generate the uuids for us |
95 | */ | 101 | */ |
96 | QString UidGen::uuid() { | 102 | QString UidGen::uuid() { |
97 | QFile file( "/proc/sys/kernel/random/uuid" ); | 103 | QFile file( "/proc/sys/kernel/random/uuid" ); |
98 | if (!file.open(IO_ReadOnly ) ) | 104 | if (!file.open(IO_ReadOnly ) ) |
99 | return QString::null; | 105 | return QString::null; |
100 | 106 | ||
101 | QTextStream stream(&file); | 107 | QTextStream stream(&file); |
102 | 108 | ||
103 | return "{" + stream.read().stripWhiteSpace() + "}"; | 109 | return "{" + stream.read().stripWhiteSpace() + "}"; |
104 | } | 110 | } |
105 | #else | ||
106 | QString UidGen::uuid() { | ||
107 | uuid_t uuid; | ||
108 | uuid_generate( uuid ); | ||
109 | return QUUid( uuid ).toString(); | ||
110 | } | ||
111 | #endif | 111 | #endif |
112 | } | 112 | } |
113 | 113 | ||
114 | QString SyncAuthentication::serverId() | 114 | QString SyncAuthentication::serverId() |
115 | { | 115 | { |
116 | Config cfg("Security"); | 116 | Config cfg("Security"); |
117 | cfg.setGroup("Sync"); | 117 | cfg.setGroup("Sync"); |
118 | QString r=cfg.readEntry("serverid"); | 118 | QString r=cfg.readEntry("serverid"); |