* */
| 122 | * |
| 123 | */ |
| 124 | static int do_send_message_component(struct xmpp_private_data *priv, |
| 125 | struct xmpp_pipe_cmd *cmd) |
| 126 | { |
| 127 | xode x; |
| 128 | |
| 129 | LM_DBG("do_send_message_component from=[%s] to=[%s] body=[%s]\n", |
| 130 | cmd->from, cmd->to, cmd->body); |
| 131 | |
| 132 | x = xode_new_tag("message"); |
| 133 | xode_put_attrib(x, "id", cmd->id); // XXX |
| 134 | xode_put_attrib(x, "from", cmd->from); |
| 135 | xode_put_attrib(x, "to", cmd->to); |
| 136 | xode_put_attrib(x, "type", "chat"); |
| 137 | xode_insert_cdata(xode_insert_tag(x, "body"), cmd->body, -1); |
| 138 | |
| 139 | xode_send(priv->fd, x); |
| 140 | xode_free(x); |
| 141 | |
| 142 | /* missing error handling here ?!?!*/ |
| 143 | return 0; |
| 144 | } |
| 145 | |
| 146 | static int do_send_bulk_message_component(struct xmpp_private_data *priv, |
| 147 | struct xmpp_pipe_cmd *cmd) |
no test coverage detected