Changeset 4431:cbea30f1890d in roaraudio for roard/req.c
- Timestamp:
- 10/09/10 14:38:41 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/req.c
r4343 r4431 536 536 #endif 537 537 538 int req_on_server_info (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 539 struct roar_server_info info; 540 uint16_t * d16; 541 542 if ( mes->datalen != 4 ) 543 return -1; 544 545 d16 = (uint16_t*)mes->data; 546 547 // check version. 548 if ( ROAR_NET2HOST16(d16[0]) != 0 ) 549 return -1; 550 551 switch (ROAR_NET2HOST16(d16[1])) { 552 case ROAR_IT_SERVER: 553 memset(&info, 0, sizeof(info)); 554 555 info.version = "roard/? <0/RoarAudio>"; 556 info.location = g_config->location; 557 info.description = g_config->description; 558 559 if ( roar_server_info_to_mes(mes, &info) == -1 ) 560 return -1; 561 break; 562 default: /* unknown request */ 563 return -1; 564 break; 565 } 566 567 mes->cmd = ROAR_CMD_OK; 568 569 return 0; 570 } 571 538 572 int req_on_server_oinfo (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 539 573 struct roar_stream s;
Note: See TracChangeset
for help on using the changeset viewer.