1
mirror of https://github.com/rapid7/metasploit-payloads synced 2024-11-26 17:41:08 +01:00

Use common.h break macro

This commit is contained in:
guffre 2023-03-06 23:46:51 -06:00
parent fe2acd8332
commit 2153df9f64

View File

@ -290,7 +290,7 @@ static DWORD validate_response_winhttp(HANDLE hReq, HttpTransportContext* ctx)
*/
static DWORD packet_transmit_http(Remote *remote, LPBYTE rawPacket, DWORD rawPacketLength)
{
DWORD result = ERROR_SUCCESS;
DWORD dwResult = ERROR_SUCCESS;
HINTERNET hReq;
BOOL res;
HttpTransportContext* ctx = (HttpTransportContext*)remote->transport->ctx;
@ -302,32 +302,23 @@ static DWORD packet_transmit_http(Remote *remote, LPBYTE rawPacket, DWORD rawPac
hReq = ctx->create_req(ctx, FALSE, "PACKET TRANSMIT");
if (hReq == NULL)
{
result = GetLastError();
break;
BREAK_ON_ERROR("[PACKET TRANSMIT] Failed create_req");
}
res = ctx->send_req(ctx, hReq, rawPacket, rawPacketLength);
if (!res)
{
result = GetLastError();
break;
BREAK_ON_ERROR("[PACKET TRANSMIT] Failed send_req");
}
} while(0);
if (result != ERROR_SUCCESS)
{
dprintf("[PACKET TRANSMIT] transmit request failed with return: %d", result);
}
else
{
dprintf("[PACKET TRANSMIT] request sent.. apparently");
}
} while(0);
ctx->close_req(hReq);
lock_release(remote->lock);
return result;
return dwResult;
}
/*!