Changeset 101:1b0b428158f6 in roaraudio
- Timestamp:
- 07/13/08 02:13:20 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/req.c
r100 r101 201 201 202 202 int req_on_get_meta (int client, struct roar_message * mes, char * data) { 203 return -1; 203 int vallen; 204 int type; 205 char val[LIBROAR_BUFFER_MSGDATA-2]; 206 207 if ( mes->datalen != 2 ) 208 return -1; 209 210 if ( mes->data[0] != 0 ) // version 211 return -1; 212 213 type = (unsigned) mes->data[1]; 214 215 if ( stream_meta_get(mes->stream, type, NULL, val, LIBROAR_BUFFER_MSGDATA-2) == -1 ) 216 return -1; 217 218 vallen = strlen(val); 219 220 mes->cmd = ROAR_CMD_OK; 221 mes->datalen = 2 + vallen; 222 223 mes->data[0] = 0; 224 mes->data[1] = (unsigned char) vallen; 225 226 strncpy(&(mes->data[2]), val, vallen); 227 228 return 0; 204 229 } 205 230
Note: See TracChangeset
for help on using the changeset viewer.