Mercurial > hg > orthanc
comparison PalantirServer/main.cpp @ 26:6ba765ecf3db
compiling openssl
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 28 Aug 2012 15:10:02 +0200 |
parents | dd1489098265 |
children | cfe212a513c5 |
comparison
equal
deleted
inserted
replaced
25:dd1489098265 | 26:6ba765ecf3db |
---|---|
93 | 93 |
94 | 94 |
95 | 95 |
96 int main(int argc, char* argv[]) | 96 int main(int argc, char* argv[]) |
97 { | 97 { |
98 if (argc >= 2) | |
99 { | |
100 PalantirInitialize(argv[1]); | |
101 } | |
102 else | |
103 { | |
104 PalantirInitialize(); | |
105 } | |
106 | |
107 | |
108 try | 98 try |
109 { | 99 { |
100 if (argc >= 2) | |
101 { | |
102 PalantirInitialize(argv[1]); | |
103 } | |
104 else | |
105 { | |
106 PalantirInitialize(); | |
107 } | |
108 | |
110 std::string storageDirectory = GetGlobalStringParameter("StorageDirectory", "PalantirStorage"); | 109 std::string storageDirectory = GetGlobalStringParameter("StorageDirectory", "PalantirStorage"); |
111 ServerIndex index(storageDirectory); | 110 ServerIndex index(storageDirectory); |
112 MyDicomStoreFactory storeScp(index, storageDirectory); | 111 MyDicomStoreFactory storeScp(index, storageDirectory); |
113 | 112 |
114 { | 113 { |
155 // Stop | 154 // Stop |
156 printf("Finishing\n"); | 155 printf("Finishing\n"); |
157 } | 156 } |
158 | 157 |
159 storeScp.Done(); | 158 storeScp.Done(); |
159 | |
160 PalantirFinalize(); | |
160 } | 161 } |
161 catch (PalantirException& e) | 162 catch (PalantirException& e) |
162 { | 163 { |
163 std::cout << "EXCEPT [" << e.What() << "]" << std::endl; | 164 std::cout << "EXCEPT [" << e.What() << "]" << std::endl; |
164 } | 165 } |
165 | 166 |
166 PalantirFinalize(); | |
167 | |
168 return 0; | 167 return 0; |
169 } | 168 } |