refine the log

This commit is contained in:
Max Lv
2015-10-29 14:35:48 +08:00
parent 99633b9908
commit c1959cac7f
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1233,7 +1233,7 @@ char * ss_decrypt_all(int buf_size, char *ciphertext, ssize_t *len, int method,
size_t c_len = *len, p_len = *len - iv_len;
int ret = 1;
if (*len < iv_len) {
if (*len <= iv_len) {
return NULL;
}
+2 -2
View File
@@ -653,7 +653,7 @@ static void remote_recv_cb(EV_P_ ev_io *w, int revents)
#ifdef UDPRELAY_LOCAL
buf = ss_decrypt_all(BUF_SIZE, buf, &buf_len, server_ctx->method, 0);
if (buf == NULL) {
ERROR("[udp] server_ss_decrypt_all");
LOGE("[udp] server_ss_decrypt_all");
goto CLEAN_UP;
}
@@ -835,7 +835,7 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents)
buf = ss_decrypt_all(BUF_SIZE, buf, &buf_len, server_ctx->method, server_ctx->auth);
if (buf == NULL) {
ERROR("[udp] server_ss_decrypt_all");
LOGE("[udp] server_ss_decrypt_all");
goto CLEAN_UP;
}
#endif