aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/mysql-connector-cpp/protobuf-source.patch
blob: 4412dec7e1ae7a459424b0e405242de411596c35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
diff --git a/cdk/protocol/mysqlx/protocol.cc b/cdk/protocol/mysqlx/protocol.cc
index d4589c27..c61deca4 100644
--- a/cdk/protocol/mysqlx/protocol.cc
+++ b/cdk/protocol/mysqlx/protocol.cc
@@ -117,18 +117,15 @@ namespace mysqlx {
   Protobuf log handler initialization.
 */
 
-static void log_handler(LogLevel level, const char* filename, int line, const std::string& message);
 
 #ifdef _WIN32
 BOOL CALLBACK log_handler_init(PINIT_ONCE, PVOID, PVOID*)
 {
-  SetLogHandler(&log_handler);
   return TRUE;
 }
 #else
 static void log_handler_init()
 {
-  SetLogHandler(log_handler);
 }
 #endif
 
@@ -289,37 +286,6 @@ Message* mk_message(Protocol_side side, msg_type_t msg_type)
   situation occurs in Protobuf (such as parsing error etc).
 */
 
-static void log_handler(
-  LogLevel level, const char* /*filename*/, int /*line*/,
-  const std::string& message
-)
-{
-  switch(level)
-  {
-    case LOGLEVEL_FATAL:
-    case LOGLEVEL_ERROR:
-      /*
-        With this code the error description is:
-
-          MMM: Protobuf error (cdk:NNN)
-
-        where MMM is the message and NNN is the protbuf error code.
-
-        TODO: Change description to:
-
-          Protobuf error: MMM (cdk:NNN)
-      */
-      throw_error(cdkerrc::protobuf_error, message);
-
-    case LOGLEVEL_WARNING:
-    case LOGLEVEL_INFO:
-    default:
-    {
-      // just ignore for now
-      // TODO: this could be used for logging in the future
-    }
-  }
-}
 
 /*
   Implementation of protobuf's ZeroCopyOutputStream which stores