Changeset 4745:1e974ec321bd in roaraudio for roard/auth.c


Ignore:
Timestamp:
01/31/11 15:16:14 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Better auth type oder support (Closes: #6)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/auth.c

    r4739 r4745  
    115115} 
    116116 
    117 int auth_client_ckeck(struct roar_client_server * cs, struct roar_auth_message * authmes) { 
     117int auth_client_ckeck(struct roar_client_server * cs, struct roar_auth_message * authmes, int * next) { 
    118118 struct auth_key * key; 
    119119 int i; 
    120120 int ret; 
    121121 
    122  if ( cs == NULL || authmes == NULL ) 
    123   return -1; 
     122 if ( cs == NULL || authmes == NULL || next == NULL ) 
     123  return -1; 
     124 
     125 *next = -1; 
    124126 
    125127 for (i = 0; i < AUTH_KEYRING_LEN; i++) { 
     
    150152      /* ignore this case and continue */ 
    151153     break; 
    152     case 0: 
     154    case 0: // fatal auth error (server side auth cancel) 
    153155      return 0; 
    154156     break; 
     
    163165  } 
    164166 } 
     167 
     168 // make a better guess: 
     169/* 
     170 if ( authmes->type == ROAR_AUTH_T_PASSWORD ) { 
     171  *next = -1; 
     172 } else { 
     173  *next = ROAR_AUTH_T_PASSWORD; 
     174 } 
     175*/ 
    165176 
    166177 return -1; 
Note: See TracChangeset for help on using the changeset viewer.