| 134 | } |
| 135 | |
| 136 | int IMtAction::DoEncode() |
| 137 | { |
| 138 | MtMsgBuf* msg_buff = NULL; |
| 139 | if (_conn) { |
| 140 | msg_buff = _conn->GetMtMsgBuff(); |
| 141 | } |
| 142 | if (!_conn || !msg_buff) { |
| 143 | MTLOG_ERROR("conn(%p) or msgbuff(%p) null", _conn, msg_buff); |
| 144 | return -100; |
| 145 | } |
| 146 | |
| 147 | int msg_len = msg_buff->GetMaxLen(); |
| 148 | int ret = this->HandleEncode(msg_buff->GetMsgBuff(), msg_len, _msg); |
| 149 | if (ret < 0) |
| 150 | { |
| 151 | MTLOG_DEBUG("handleecode failed, ret %d", ret); |
| 152 | return ret; |
| 153 | } |
| 154 | msg_buff->SetMsgLen(msg_len); |
| 155 | |
| 156 | return 0; |
| 157 | } |
| 158 | |
| 159 | int IMtAction::DoInput() |
| 160 | { |
no test coverage detected