Changeset 4468:f8d2cccafc74 in roaraudio
- Timestamp:
- 10/10/10 17:50:11 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/clients.c
r4467 r4468 86 86 ns->blockc = 0; 87 87 ns->waits = NULL; 88 ns->acclev = ACCLEV_ ALL;88 ns->acclev = ACCLEV_NONE; 89 89 90 90 g_clients[i] = ns; … … 206 206 207 207 *client = ROAR_CLIENT(g_clients[id]); 208 209 if ( *client == NULL ) 210 return -1; 211 212 return 0; 213 } 214 215 int clients_get_server (int id, struct roar_client_server ** client) { 216 _CHECK_CID(id); 217 218 *client = g_clients[id]; 208 219 209 220 if ( *client == NULL ) -
roard/include/client.h
r4467 r4468 84 84 int clients_set_proto (int id, int proto); 85 85 int clients_get (int id, struct roar_client ** client); 86 int clients_get_server (int id, struct roar_client_server ** client); 86 87 int clients_get_fh (int id); 87 88 -
roard/req.c
r4442 r4468 58 58 59 59 int req_on_identify (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 60 struct roar_client * c; 60 struct roar_client_server * cs; 61 struct roar_client * c; 61 62 int max_len; 62 63 … … 64 65 return -1; 65 66 66 clients_get(client, &c); 67 clients_get_server(client, &cs); 68 69 c = ROAR_CLIENT(cs); 67 70 68 71 if ( mes->data[0] == 1 ) { … … 79 82 c->name[max_len] = 0; 80 83 84 // we set the acclevel to IDENTED here. 85 // if it is alreay > IDENTED we reset it anyway 86 // as potential auth relevent data changed. 87 cs->acclev = ACCLEV_IDENTED; 88 81 89 mes->cmd = ROAR_CMD_OK; 82 90 mes->pos = g_pos; … … 92 100 93 101 int req_on_auth (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 102 struct roar_client_server * cs; 103 104 clients_get_server(client, &cs); 105 94 106 // TODO: add code to support some auth. 107 108 cs->acclev = ACCLEV_ALL; 109 95 110 mes->cmd = ROAR_CMD_OK; 96 111 mes->pos = g_pos;
Note: See TracChangeset
for help on using the changeset viewer.