Browse Source

RPC: Add "Miner" to version response to include software name along with version

Luke Dashjr 11 years ago
parent
commit
5b6acc53f9
2 changed files with 10 additions and 1 deletions
  1. 9 1
      README.RPC
  2. 1 0
      api.c

+ 9 - 1
README.RPC

@@ -115,7 +115,8 @@ The list of requests - a (*) means it requires privileged access - and replies:
 
 
  Request       Reply Section  Details
  Request       Reply Section  Details
  -------       -------------  -------
  -------       -------------  -------
- version       VERSION        CGMiner=BFGMiner version
+ version       VERSION        Miner="BFGMiner " BFGMiner version
+                              CGMiner=BFGMiner version
                               API=API version
                               API=API version
 
 
  config        CONFIG         Some miner configuration information:
  config        CONFIG         Some miner configuration information:
@@ -470,6 +471,13 @@ api-example.py - a Python script to access the API
 Feature Changelog for external applications using the API:
 Feature Changelog for external applications using the API:
 
 
 
 
+API V
+
+Modified API commands:
+ 'version' - add 'Miner'
+
+---------
+
 API V2.1 (BFGMiner v3.4.0)
 API V2.1 (BFGMiner v3.4.0)
 
 
 Added API command:
 Added API command:

+ 1 - 0
api.c

@@ -1286,6 +1286,7 @@ static void apiversion(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __m
 	message(io_data, MSG_VERSION, 0, NULL, isjson);
 	message(io_data, MSG_VERSION, 0, NULL, isjson);
 	io_open = io_add(io_data, isjson ? COMSTR JSON_VERSION : _VERSION COMSTR);
 	io_open = io_add(io_data, isjson ? COMSTR JSON_VERSION : _VERSION COMSTR);
 
 
+	root = api_add_string(root, "Miner", PACKAGE " " VERSION, false);
 	root = api_add_string(root, "CGMiner", VERSION, false);
 	root = api_add_string(root, "CGMiner", VERSION, false);
 	root = api_add_const(root, "API", APIVERSION, false);
 	root = api_add_const(root, "API", APIVERSION, false);