aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mysqlerl.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mysqlerl.c b/src/mysqlerl.c
index 0f88a49..dfd7ef0 100644
--- a/src/mysqlerl.c
+++ b/src/mysqlerl.c
@@ -175,8 +175,16 @@ write_cmd(const char *cmd, msglen_t len)
void
dispatch_db_cmd(MYSQL *dbh, msg_t *msg)
{
- logmsg("DEBUG: type: %d, msg: %s.", msg->type, msg->msg);
- write_cmd(msg->msg, msg->msglen);
+ switch (msg->type) {
+ case QUERY_MSG:
+ logmsg("DEBUG: got query msg: %s.", msg->msg);
+ write_cmd(msg->msg, msg->msglen);
+ break;
+
+ default:
+ logmsg("WARNING: message type %d unknown.", msg->type);
+ exit(3);
+ }
}
void