summaryrefslogtreecommitdiff
path: root/src/msgparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/msgparser.cc')
-rw-r--r--src/msgparser.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/msgparser.cc b/src/msgparser.cc
index f3bafe1..675e305 100644
--- a/src/msgparser.cc
+++ b/src/msgparser.cc
@@ -203,6 +203,9 @@ MsgVector parse_msg(std::string data) {
printf("Wrong number of parameters\n");
continue;
}
+ m.update.id = atoi(t[1].c_str());
+ sprintf(m.update.title, "%s", t[2].c_str());
+ sprintf(m.update.desc, "%s", t[3].c_str());
break;
}
default:
@@ -247,6 +250,7 @@ msg_t create_msg(cmd::cmd_t type, task_t t) {
// m.update.desc = t.desc;
snprintf(m.update.title, sizeof(m.update.title), "%s", t.title.c_str());
snprintf(m.update.desc, sizeof(m.update.desc), "%s", t.desc.c_str());
+// printf("msg: %d, %s, %s\n", m.update.id, m.update.title, m.update.desc);
break;
};
default:
@@ -286,6 +290,7 @@ std::string msg_tostring(msg_t m) {
}
case cmd::update: {
//todo
+ asprintf(&buf, "update %d \"%s\" \"%s\";", m.update.id, m.update.title, m.update.desc);
break;
};
default: