merge default into JSON-75 JSON-75
authorClaudio Luck <claudio.luck@pep.foundation>
Thu, 05 Apr 2018 18:35:13 +0200
branchJSON-75
changeset 45751f56ffd4c65
parent 453 a4d710c6c845
parent 456 84d11d4b6adb
child 461 a032fea0a134
child 463 e80f004acb81
merge default into JSON-75
server/main.cc
server/server_version.cc
     1.1 --- a/server/ev_server.cc	Mon Apr 02 22:54:48 2018 +0200
     1.2 +++ b/server/ev_server.cc	Thu Apr 05 18:35:13 2018 +0200
     1.3 @@ -57,6 +57,10 @@
     1.4  		FP( "Message API", new Separator ),
     1.5  		FP( "MIME_encrypt_message", new Func<PEP_STATUS, In<PEP_SESSION, false>, In<c_string>, In<size_t>, In<stringlist_t*>,
     1.6  			Out<char*>, In<PEP_enc_format>, In<PEP_encrypt_flags_t>>( &MIME_encrypt_message ) ),
     1.7 +		FP( "MIME_encrypt_message_for_self", new Func<PEP_STATUS, In<PEP_SESSION, false>, 
     1.8 +			In<pEp_identity*>, In<c_string>, In<size_t>, In<stringlist_t*>,
     1.9 +			Out<char*>, In<PEP_enc_format>, In<PEP_encrypt_flags_t>>( &MIME_encrypt_message_for_self ) ),
    1.10 +			
    1.11  		FP( "MIME_decrypt_message", new Func<PEP_STATUS, In<PEP_SESSION, false>, In<c_string>, In<size_t>,
    1.12  			Out<char*>, Out<stringlist_t*>, Out<PEP_rating>, Out<PEP_decrypt_flags_t>>( &MIME_decrypt_message ) ),
    1.13  		
    1.14 @@ -66,6 +70,9 @@
    1.15  		FP( "stopKeyserverLookup",  new Func<void>( &JsonAdapter::stopKeyserverLookup ) ),
    1.16  		
    1.17  		FP( "encrypt_message", new Func<PEP_STATUS, In<PEP_SESSION, false>, In<message*>, In<stringlist_t*>, Out<message*>, In<PEP_enc_format>, In<PEP_encrypt_flags_t>>( &encrypt_message ) ),
    1.18 +		FP( "encrypt_message_for_self", new Func<PEP_STATUS, In<PEP_SESSION, false>,
    1.19 +			In<pEp_identity*>, In<message*>, In<stringlist_t*>, Out<message*>, In<PEP_enc_format>, In<PEP_encrypt_flags_t>>( &encrypt_message_for_self ) ),
    1.20 +		
    1.21  		FP( "decrypt_message", new Func<PEP_STATUS, In<PEP_SESSION, false>, In<message*>, Out<message*>, Out<stringlist_t*>, Out<PEP_rating>, Out<PEP_decrypt_flags_t>>(  &decrypt_message ) ),
    1.22  		FP( "outgoing_message_rating", new Func<PEP_STATUS, In<PEP_SESSION,false>, In<message*>, Out<PEP_rating>>( &outgoing_message_rating ) ),
    1.23  		FP( "identity_rating" , new Func<PEP_STATUS, In<PEP_SESSION,false>, In<pEp_identity*>, Out<PEP_rating>>( &identity_rating) ),
     2.1 --- a/server/main.cc	Mon Apr 02 22:54:48 2018 +0200
     2.2 +++ b/server/main.cc	Thu Apr 05 18:35:13 2018 +0200
     2.3 @@ -62,8 +62,15 @@
     2.4  	;
     2.5  	
     2.6  	po::variables_map vm;
     2.7 -	po::store(po::parse_command_line(argc, argv, desc), vm);
     2.8 -	po::notify(vm);
     2.9 +	
    2.10 +	try{
    2.11 +		po::store(po::parse_command_line(argc, argv, desc), vm);
    2.12 +		po::notify(vm);
    2.13 +	}catch(const po::error& e)
    2.14 +	{
    2.15 +		std::cerr << "Cannot parse command line: " << e.what() << "\n\n" << desc << std::endl;
    2.16 +		return 2;
    2.17 +	}
    2.18  	
    2.19  	if (vm.count("help"))
    2.20  	{
    2.21 @@ -130,7 +137,7 @@
    2.22  		exit(1);
    2.23  	}
    2.24  }
    2.25 -catch (std::exception const &e)
    2.26 +catch(std::exception const& e)
    2.27  {
    2.28  	std::cerr << "Exception caught in main(): \"" << e.what() << "\"" << std::endl;
    2.29  	daemonize_commit(1);
     3.1 --- a/server/server_version.cc	Mon Apr 02 22:54:48 2018 +0200
     3.2 +++ b/server/server_version.cc	Thu Apr 05 18:35:13 2018 +0200
     3.3 @@ -61,6 +61,7 @@
     3.4  //const ServerVersion sv{0, 12, 1, version_name};  // add assert_utf8() for every string to/from the Engine (except blobdata)
     3.5  //const ServerVersion sv{0, 12, 2, version_name};  // fix the fork() problem on MacOS. daemonize() now got a function parameter.
     3.6  //const ServerVersion sv(0,13,0);  // add package_version, rename "version" into "api_version" in ServerVersion, add versions from the Engine, too
     3.7 +//const ServerVersion sv(0,13,1);  // JSON-91: add MIME_encrypt_message_for_self() and encrypt_message_for_self()
     3.8  const ServerVersion sv(0,14,0);  // FIXME
     3.9  
    3.10  } // end of anonymous namespace