@@ -43,8 +43,7 @@ static int wh_DemoClient_AuthPin(whClientContext* clientContext)
4343 "admin" ,
4444 "1234" , 4 ,
4545 & serverRc ,
46- & adminUserId ,
47- & out_permissions );
46+ & adminUserId );
4847 if (rc != 0 ) {
4948 printf ("[AUTH-DEMO] Failed to login as admin: %d\n" , rc );
5049 return rc ;
@@ -53,7 +52,7 @@ static int wh_DemoClient_AuthPin(whClientContext* clientContext)
5352 printf ("[AUTH-DEMO] Server-side error logging in as admin: %d\n" , (int )serverRc );
5453 return (int )serverRc ;
5554 }
56-
55+
5756 memset (& out_permissions , 0 , sizeof (whAuthPermissions ));
5857 rc = wh_Client_AuthUserAdd (clientContext , "demo" , out_permissions ,
5958 WH_AUTH_METHOD_PIN , pin , (uint16_t )(sizeof (pin ) - 1 ),
@@ -78,8 +77,7 @@ static int wh_DemoClient_AuthPin(whClientContext* clientContext)
7877 badPin ,
7978 (uint16_t )(sizeof (badPin ) - 1 ),
8079 & serverRc ,
81- & userId ,
82- & out_permissions );
80+ & userId );
8381
8482 if (rc == WH_ERROR_OK && serverRc != WH_AUTH_LOGIN_FAILED ) {
8583 printf ("[AUTH-DEMO] Failed to not login with bad pin: %d, serverRc=%d\n" , rc , serverRc );
@@ -92,8 +90,7 @@ static int wh_DemoClient_AuthPin(whClientContext* clientContext)
9290 pin ,
9391 (uint16_t )(sizeof (pin ) - 1 ),
9492 & serverRc ,
95- & userId ,
96- & out_permissions );
93+ & userId );
9794
9895 if (rc == WH_ERROR_NOTIMPL ) {
9996 printf ("[AUTH-DEMO] wh_Client_AuthAuthenticate() not implemented yet.\n" );
@@ -151,8 +148,7 @@ static int wh_DemoClient_AuthPin(whClientContext* clientContext)
151148 pin ,
152149 (uint16_t )(sizeof (pin ) - 1 ),
153150 & serverRc ,
154- & userId ,
155- & out_permissions );
151+ & userId );
156152
157153 if (rc == 0 && serverRc == 0 ) {
158154 printf ("[AUTH-DEMO] Old PIN still works (unexpected)\n" );
@@ -165,8 +161,7 @@ static int wh_DemoClient_AuthPin(whClientContext* clientContext)
165161 newPin ,
166162 (uint16_t )(sizeof (newPin ) - 1 ),
167163 & serverRc ,
168- & userId ,
169- & out_permissions );
164+ & userId );
170165
171166 if (rc != 0 ) {
172167 printf ("[AUTH-DEMO] Client-side error with new PIN: %d\n" , rc );
@@ -226,8 +221,7 @@ static int wh_DemoClient_AuthCertificate(whClientContext* clientContext)
226221 "admin" ,
227222 "1234" , 4 ,
228223 & serverRc ,
229- & adminUserId ,
230- & out_permissions );
224+ & adminUserId );
231225 if (rc != 0 ) {
232226 printf ("[AUTH-DEMO] Failed to login as admin: %d\n" , rc );
233227 return rc ;
@@ -264,8 +258,7 @@ static int wh_DemoClient_AuthCertificate(whClientContext* clientContext)
264258 server_cert ,
265259 server_cert_len ,
266260 & serverRc ,
267- & userId ,
268- & out_permissions );
261+ & userId );
269262
270263 if (rc == WH_ERROR_NOTIMPL ) {
271264 printf ("[AUTH-DEMO] wh_Client_AuthLogin() not implemented for certificates.\n" );
@@ -311,8 +304,7 @@ static int wh_DemoClient_AuthUserDelete(whClientContext* clientContext)
311304 "admin" ,
312305 "1234" , 4 ,
313306 & serverRc ,
314- & adminUserId ,
315- & permissions );
307+ & adminUserId );
316308 if (rc != 0 ) {
317309 return rc ;
318310 }
@@ -364,8 +356,7 @@ static int wh_DemoClient_AuthUserSetPermissions(whClientContext* clientContext)
364356 "admin" ,
365357 "1234" , 4 ,
366358 & serverRc ,
367- & adminUserId ,
368- & permissions );
359+ & adminUserId );
369360 if (rc != 0 ) {
370361 return rc ;
371362 }
0 commit comments