Changeset 3337 in ntrip
- Timestamp:
- Jul 19, 2011, 4:38:34 PM (13 years ago)
- Location:
- trunk/BNC
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r3334 r3337 571 571 } 572 572 else if (_ntripVersion == "2") { 573 _query = new bncNetQueryV2( );573 _query = new bncNetQueryV2(false); 574 574 } 575 575 else if (_ntripVersion == "2s") { 576 _query = new bncNetQueryV2( );576 _query = new bncNetQueryV2(true); 577 577 } 578 578 else { -
trunk/BNC/bncnetqueryv2.cpp
r3332 r3337 23 23 // Constructor 24 24 //////////////////////////////////////////////////////////////////////////// 25 bncNetQueryV2::bncNetQueryV2() { 25 bncNetQueryV2::bncNetQueryV2(bool secure) { 26 _secure = secure; 26 27 _manager = new QNetworkAccessManager(this); 27 28 connect(_manager, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, … … 93 94 _url = url; 94 95 if (_url.scheme().isEmpty()) { 95 _url.setScheme("http"); 96 if (_secure) { 97 _url.setScheme("https"); 98 } 99 else { 100 _url.setScheme("http"); 101 } 96 102 } 97 103 if (_url.path().isEmpty()) { -
trunk/BNC/bncnetqueryv2.h
r3332 r3337 8 8 9 9 public: 10 bncNetQueryV2( );10 bncNetQueryV2(bool secure); 11 11 virtual ~bncNetQueryV2(); 12 12 … … 28 28 QEventLoop* _eventLoop; 29 29 bool _firstData; 30 bool _secure; 30 31 }; 31 32 -
trunk/BNC/bncrinex.cpp
r3335 r3337 55 55 #include "bnctabledlg.h" 56 56 #include "bncgetthread.h" 57 #include "bncnetqueryv1.h" 57 58 #include "bncnetqueryv2.h" 58 59 #include "bncsettings.h" … … 160 161 } 161 162 162 bncNetQueryV2 query; 163 bncNetQuery* query; 164 if (_ntripVersion == "2s") { 165 query = new bncNetQueryV2(true); 166 } 167 else if (_ntripVersion == "2") { 168 query = new bncNetQueryV2(false); 169 } 170 else { 171 query = new bncNetQueryV1; 172 } 173 163 174 QByteArray outData; 164 query .waitForRequestResult(url, outData);165 if (query .status() == bncNetQuery::finished) {175 query->waitForRequestResult(url, outData); 176 if (query->status() == bncNetQuery::finished) { 166 177 _headerLines.clear(); 167 178 bool firstLineRead = false; … … 206 217 } 207 218 else { 219 delete query; 208 220 return failure; 209 221 } 210 211 } 222 delete query; 223 } 224 212 225 return irc; 213 226 } -
trunk/BNC/bnctabledlg.cpp
r3336 r3337 199 199 200 200 bncNetQuery* query = 0; 201 if (ntripVersion == "2" || ntripVersion == "2s") { 202 query = new bncNetQueryV2(); 201 if (ntripVersion == "2") { 202 query = new bncNetQueryV2(false); 203 } 204 else if (ntripVersion == "2s") { 205 query = new bncNetQueryV2(true); 203 206 } 204 207 else { … … 554 557 555 558 bncNetQuery* query = 0; 556 if (ntripVersion == "2" || ntripVersion == "2s") { 557 query = new bncNetQueryV2(); 559 if (ntripVersion == "2") { 560 query = new bncNetQueryV2(false); 561 } 562 else if (ntripVersion == "2s") { 563 query = new bncNetQueryV2(true); 558 564 } 559 565 else {
Note:
See TracChangeset
for help on using the changeset viewer.