Changeset 3737:e79803f4911d in roaraudio for roard/clients.c
- Timestamp:
- 04/26/10 13:55:19 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/clients.c
r3713 r3737 91 91 } 92 92 93 int clients_new_from_fh(int fh, int proto, int byteorder, int update_nnode) { 94 struct roar_client * c; 95 int client; 96 97 if ( fh == -1 ) 98 return -1; 99 100 if ( proto != ROAR_PROTO_ROARAUDIO || byteorder != ROAR_BYTEORDER_NETWORK ) 101 return -1; 102 103 if ( (client = clients_new()) == -1 ) 104 return -1; 105 106 if ( clients_set_fh(client, fh) == -1 ) { 107 clients_delete(client); 108 return -1; 109 } 110 111 if ( update_nnode ) { 112 if ( clients_get(client, &c) != -1 ) { 113 if ( roar_nnode_free(&(c->nnode)) != -1 ) { 114 roar_nnode_new_from_fh(&(c->nnode), fh, 1); 115 } 116 } 117 } 118 119 return 0; 120 } 121 93 122 int clients_delete (int id) { 94 123 int i;
Note: See TracChangeset
for help on using the changeset viewer.