diff --git a/src/dap_client_http.c b/src/dap_client_http.c index 013333bdc4fc25e4556a0a25fbbd3e3ac6bf4409..aa134cd1286d1d040adcca63a4c8193c2e8b061e 100644 --- a/src/dap_client_http.c +++ b/src/dap_client_http.c @@ -328,10 +328,10 @@ void* dap_client_http_request_custom(const char *a_uplink_addr, uint16_t a_uplin int l_err = 0; if((l_err = connect(l_socket, (struct sockaddr *) &l_remote_addr, sizeof(struct sockaddr_in))) != -1) { //s_set_sock_nonblock(a_client_pvt->stream_socket, false); - log_it(L_INFO, "Remote address connected (%s:%u) with sock_id %d", a_uplink_addr, a_uplink_port, socket); + log_it(L_INFO, "Remote address connected (%s:%u) with sock_id %d", a_uplink_addr, a_uplink_port, l_socket); } else { - log_it(L_ERROR, "Remote address can't connected (%s:%u) with sock_id %d", a_uplink_addr, a_uplink_port); + log_it(L_ERROR, "Remote address can't connected (%s:%u) with sock_id %d", a_uplink_addr, a_uplink_port, l_socket); //l_ev_socket->no_close = false; dap_events_socket_kill_socket(l_ev_socket); //shutdown(l_ev_socket->socket, SHUT_RDWR); diff --git a/src/dap_client_pvt.c b/src/dap_client_pvt.c index 5050fc2a4831736a7505fd85c45d2e9d0340ccdc..34702df7c31946485407dbe078a6a3ed7126bb9a 100644 --- a/src/dap_client_pvt.c +++ b/src/dap_client_pvt.c @@ -414,7 +414,7 @@ static void s_stage_status_after(dap_client_pvt_t * a_client_pvt) DAP_DELETE(l_key_str); } break; - case STAGE_STREAM_CTL: { + case STAGE_STREAM_CTL: { log_it(L_INFO, "Go to stage STREAM_CTL: prepare the request"); char *l_request = dap_strdup_printf("%d", DAP_CLIENT_PROTOCOL_VERSION); @@ -625,7 +625,7 @@ static void s_stage_status_after(dap_client_pvt_t * a_client_pvt) // Expecting that its one-shot callback a_client_pvt->stage_target_done_callback = NULL; } - } else{ + } else if (a_client_pvt->stage != STAGE_STREAM_CTL) { // need wait for dap_client_pvt_request_enc response log_it(L_ERROR, "!! dap_CLIENT_STAGE_STATUS_DONE but not l_is_last_stage (cur stage=%d, target=%d)!!",a_client_pvt->stage, a_client_pvt->stage_target); } //l_is_unref = true;