Skip to content

Commit 77b4783

Browse files
remove version override
1 parent f3ade8f commit 77b4783

File tree

4 files changed

+5
-34
lines changed

4 files changed

+5
-34
lines changed

pc/manager.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ manager::manager()
3939
: sub_( nullptr ),
4040
status_( 0 ),
4141
num_sub_( 0 ),
42-
version_( PC_VERSION ),
4342
kidx_( (unsigned)-1 ),
4443
cts_( 0L ),
4544
ctimeout_( PC_NSECS_IN_SEC ),
@@ -136,16 +135,6 @@ int manager::get_listen_port() const
136135
return lsvr_.get_port();
137136
}
138137

139-
void manager::set_version( uint32_t version )
140-
{
141-
version_ = version;
142-
}
143-
144-
uint32_t manager::get_version() const
145-
{
146-
return version_;
147-
}
148-
149138
void manager::set_content_dir( const std::string& cdir )
150139
{
151140
cdir_ = cdir;
@@ -262,7 +251,7 @@ bool manager::init()
262251
.end();
263252
}
264253
PC_LOG_INF( "initialized" )
265-
.add( "version", version_ )
254+
.add( "version", PC_VERSION )
266255
.add( "capture_file", get_capture_file() )
267256
.add( "publish_interval(ms)", get_publish_interval() )
268257
.end();

pc/manager.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ namespace pc
5757
void set_listen_port( int port );
5858
int get_listen_port() const;
5959

60-
// server subscription version
61-
void set_version( uint32_t );
62-
uint32_t get_version() const;
63-
6460
// content directory (for http content requests if running as server)
6561
void set_content_dir( const std::string& );
6662
std::string get_content_dir() const;
@@ -191,7 +187,6 @@ namespace pc
191187
manager_sub *sub_; // subscription callback
192188
int status_; // status bitmap
193189
int num_sub_; // number of in-flight mapping subscriptions
194-
uint32_t version_; // account version subscription
195190
uint32_t kidx_; // schedule index
196191
int64_t cts_; // (re)connect timestamp
197192
int64_t ctimeout_; // connection timeout

pcapps/pyth.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -675,15 +675,13 @@ int on_upd_price( int argc, char **argv )
675675
argv += 1;
676676

677677
int opt = 0;
678-
uint32_t version = PC_VERSION;
679678
std::string rpc_host = get_rpc_host();
680679
std::string key_dir = get_key_store();
681-
while( (opt = ::getopt(argc,argv, "r:k:c:v:dh" )) != -1 ) {
680+
while( (opt = ::getopt(argc,argv, "r:k:c:dh" )) != -1 ) {
682681
switch(opt) {
683682
case 'r': rpc_host = optarg; break;
684683
case 'k': key_dir = optarg; break;
685684
case 'd': log::set_level( PC_LOG_DBG_LVL ); break;
686-
case 'v': version = ::atoi( optarg ); break;
687685
case 'c': break;
688686
default: return usage();
689687
}
@@ -693,7 +691,6 @@ int on_upd_price( int argc, char **argv )
693691
manager mgr;
694692
mgr.set_rpc_host( rpc_host );
695693
mgr.set_dir( key_dir );
696-
mgr.set_version( version );
697694
if ( !mgr.init() || !mgr.bootstrap() ) {
698695
std::cerr << "pyth: " << mgr.get_err_msg() << std::endl;
699696
return 1;
@@ -827,15 +824,13 @@ int on_get_pub_key( int argc, char **argv )
827824
int on_get_product_list( int argc, char **argv )
828825
{
829826
int opt = 0;
830-
uint32_t version = PC_VERSION;
831827
std::string rpc_host = get_rpc_host();
832828
std::string key_dir = get_key_store();
833-
while( (opt = ::getopt(argc,argv, "r:k:c:v:dh" )) != -1 ) {
829+
while( (opt = ::getopt(argc,argv, "r:k:c:dh" )) != -1 ) {
834830
switch(opt) {
835831
case 'r': rpc_host = optarg; break;
836832
case 'k': key_dir = optarg; break;
837833
case 'd': log::set_level( PC_LOG_DBG_LVL ); break;
838-
case 'v': version = ::atoi( optarg ); break;
839834
case 'c': break;
840835
default: return usage();
841836
}
@@ -845,7 +840,6 @@ int on_get_product_list( int argc, char **argv )
845840
manager mgr;
846841
mgr.set_rpc_host( rpc_host );
847842
mgr.set_dir( key_dir );
848-
mgr.set_version( version );
849843
if ( !mgr.init() || !mgr.bootstrap() ) {
850844
std::cerr << "pyth: " << mgr.get_err_msg() << std::endl;
851845
return 1;
@@ -874,15 +868,13 @@ int on_get_product( int argc, char **argv )
874868
argv += 1;
875869

876870
int opt = 0;
877-
uint32_t version = PC_VERSION;
878871
std::string rpc_host = get_rpc_host();
879872
std::string key_dir = get_key_store();
880-
while( (opt = ::getopt(argc,argv, "r:k:c:v:dh" )) != -1 ) {
873+
while( (opt = ::getopt(argc,argv, "r:k:c:dh" )) != -1 ) {
881874
switch(opt) {
882875
case 'r': rpc_host = optarg; break;
883876
case 'k': key_dir = optarg; break;
884877
case 'd': log::set_level( PC_LOG_DBG_LVL ); break;
885-
case 'v': version = ::atoi( optarg ); break;
886878
case 'c': break;
887879
default: return usage();
888880
}
@@ -892,7 +884,6 @@ int on_get_product( int argc, char **argv )
892884
manager mgr;
893885
mgr.set_rpc_host( rpc_host );
894886
mgr.set_dir( key_dir );
895-
mgr.set_version( version );
896887
if ( !mgr.init() || !mgr.bootstrap() ) {
897888
std::cerr << "pyth: " << mgr.get_err_msg() << std::endl;
898889
return 1;

pcapps/pythd.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ int usage()
3737
std::cerr << " -w <web content directory>" << std::endl;
3838
std::cerr << " -c <capture file>" << std::endl;
3939
std::cerr << " -l <log_file>" << std::endl;
40-
std::cerr << " -v <version>" << std::endl;
4140
std::cerr << " -n" << std::endl;
4241
std::cerr << " -d" << std::endl;
4342
return 1;
@@ -66,19 +65,17 @@ int main(int argc, char **argv)
6665
std::string cnt_dir, cap_file, log_file;
6766
std::string rpc_host = get_rpc_host();
6867
std::string key_dir = get_key_store();
69-
uint32_t version = PC_VERSION;
7068
int pyth_port = get_port();
7169
int opt = 0;
7270
bool do_wait = true, do_debug = false;
73-
while( (opt = ::getopt(argc,argv, "r:p:k:w:c:l:v:dnh" )) != -1 ) {
71+
while( (opt = ::getopt(argc,argv, "r:p:k:w:c:l:dnh" )) != -1 ) {
7472
switch(opt) {
7573
case 'r': rpc_host = optarg; break;
7674
case 'p': pyth_port = ::atoi(optarg); break;
7775
case 'k': key_dir = optarg; break;
7876
case 'c': cap_file = optarg; break;
7977
case 'w': cnt_dir = optarg; break;
8078
case 'l': log_file = optarg; break;
81-
case 'v': version = ::atoi( optarg ); break;
8279
case 'n': do_wait = false; break;
8380
case 'd': do_debug = true; break;
8481
default: return usage();
@@ -99,7 +96,6 @@ int main(int argc, char **argv)
9996
mgr.set_dir( key_dir );
10097
mgr.set_rpc_host( rpc_host );
10198
mgr.set_listen_port( pyth_port );
102-
mgr.set_version( version );
10399
mgr.set_content_dir( cnt_dir );
104100
mgr.set_capture_file( cap_file );
105101
mgr.set_do_capture( !cap_file.empty() );

0 commit comments

Comments
 (0)