Mercurial > hg > orthanc
comparison PalantirServer/DicomProtocol/DicomUserConnection.cpp @ 2:67a6978503b7
fixing Windows build
author | Jodogne@Laptop |
---|---|
date | Thu, 19 Jul 2012 22:33:27 +0200 |
parents | 3959d33612cc |
children |
comparison
equal
deleted
inserted
replaced
0:3959d33612cc | 2:67a6978503b7 |
---|---|
497 // Set the network addresses of the local and distant entities | 497 // Set the network addresses of the local and distant entities |
498 char localHost[HOST_NAME_MAX]; | 498 char localHost[HOST_NAME_MAX]; |
499 gethostname(localHost, HOST_NAME_MAX - 1); | 499 gethostname(localHost, HOST_NAME_MAX - 1); |
500 | 500 |
501 char distantHostAndPort[HOST_NAME_MAX]; | 501 char distantHostAndPort[HOST_NAME_MAX]; |
502 snprintf(distantHostAndPort, HOST_NAME_MAX - 1, "%s:%d", distantHost_.c_str(), distantPort_); | 502 |
503 #ifdef _MSC_VER | |
504 _snprintf | |
505 #else | |
506 snprintf | |
507 #endif | |
508 (distantHostAndPort, HOST_NAME_MAX - 1, "%s:%d", distantHost_.c_str(), distantPort_); | |
503 | 509 |
504 Check(ASC_setPresentationAddresses(pimpl_->params_, localHost, distantHostAndPort)); | 510 Check(ASC_setPresentationAddresses(pimpl_->params_, localHost, distantHostAndPort)); |
505 | 511 |
506 // Set various options | 512 // Set various options |
507 Check(ASC_setTransportLayerType(pimpl_->params_, /*opt_secureConnection*/ false)); | 513 Check(ASC_setTransportLayerType(pimpl_->params_, /*opt_secureConnection*/ false)); |