Modify the output stream(stdout to stderr) for version conflict msg.
authorKim Gunsoo <gunsoo83.kim@samsung.com>
Mon, 16 May 2016 08:19:52 +0000 (17:19 +0900)
committerKim Gunsoo <gunsoo83.kim@samsung.com>
Mon, 16 May 2016 08:26:11 +0000 (17:26 +0900)
- When the SDB client and server versions are different, outputs
  a warning message. The output stream of the warning message is
  changed from stdout to stderr.

Change-Id: I3a85a46ff48b540b37170bbca4709fd5db120b3b
Signed-off-by: Kim Gunsoo <gunsoo83.kim@samsung.com>
src/sdb_client.c

index ed98e1ad96db15be7d0465f99b907a237c675a33..dde050d276a721d1258871cc730b495dc7d6c994 100644 (file)
@@ -420,8 +420,10 @@ int sdb_connect(const char *service)
             int server_patch = strtoul(tokens[2], 0, 10);
 
             // If the version of client is not same with that of server
-            if ((server_major != SDB_VERSION_MAJOR) || (server_minor != SDB_VERSION_MINOR) || (server_patch != SDB_VERSION_PATCH)) {
-               fprintf(stdout, "* The version of SDB client (%d.%d.%d) is not same with that of SDB server (%d.%d.%d).\n  It may cause version compatibility problems.\n  It is recommended to use SDB server with version %d.%d.%d. *\n", SDB_VERSION_MAJOR, SDB_VERSION_MINOR, SDB_VERSION_PATCH, server_major, server_minor, server_patch, SDB_VERSION_MAJOR, SDB_VERSION_MINOR, SDB_VERSION_PATCH);
+            if ((server_major != SDB_VERSION_MAJOR)
+                || (server_minor != SDB_VERSION_MINOR)
+                || (server_patch != SDB_VERSION_PATCH)) {
+                fprintf(stderr, "* The version of SDB client (%d.%d.%d) is not same with that of SDB server (%d.%d.%d).\n  It may cause version compatibility problems.\n  It is recommended to use SDB server with version %d.%d.%d. *\n", SDB_VERSION_MAJOR, SDB_VERSION_MINOR, SDB_VERSION_PATCH, server_major, server_minor, server_patch, SDB_VERSION_MAJOR, SDB_VERSION_MINOR, SDB_VERSION_PATCH);
             }
         } else {
             int ver = 0;