[core,aad] typedef AAD_STATE

This commit is contained in:
akallabeth 2023-03-08 15:09:14 +01:00 committed by akallabeth
parent 2117cdcb0f
commit 3d9eaf59dc
2 changed files with 6 additions and 6 deletions

View File

@ -87,7 +87,7 @@ static const char token_http_request_body[] =
struct rdp_aad
{
enum AAD_STATE state;
AAD_STATE state;
rdpContext* rdpcontext;
rdpTransport* transport;
char* access_token;
@ -412,7 +412,7 @@ int aad_recv(rdpAad* aad, wStream* s)
LOG_ERROR_AND_RETURN(-1, "Invalid state");
}
enum AAD_STATE aad_get_state(rdpAad* aad)
AAD_STATE aad_get_state(rdpAad* aad)
{
if (!aad)
return AAD_STATE_FINAL;
@ -612,7 +612,7 @@ static int alloc_sprintf(char** s, const char* template, ...)
length = vsnprintf(NULL, 0, template, ap);
va_end(ap);
if (!(*s = malloc(length + 1)))
if (!(*s = calloc(length + 1, sizeof(char))))
return -1;
va_start(ap, template);

View File

@ -22,12 +22,12 @@
typedef struct rdp_aad rdpAad;
enum AAD_STATE
typedef enum
{
AAD_STATE_INITIAL,
AAD_STATE_AUTH,
AAD_STATE_FINAL
};
} AAD_STATE;
#include <freerdp/api.h>
#include <freerdp/freerdp.h>
@ -35,7 +35,7 @@ enum AAD_STATE
FREERDP_LOCAL int aad_client_begin(rdpAad* aad);
FREERDP_LOCAL int aad_recv(rdpAad* aad, wStream* s);
FREERDP_LOCAL enum AAD_STATE aad_get_state(rdpAad* aad);
FREERDP_LOCAL AAD_STATE aad_get_state(rdpAad* aad);
FREERDP_LOCAL rdpAad* aad_new(rdpContext* context, rdpTransport* transport);
FREERDP_LOCAL void aad_free(rdpAad* aad);