Changeset 5132:1c10be48298e in roaraudio for libroar/basic.c
- Timestamp:
- 09/09/11 16:24:15 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/basic.c
r5120 r5132 393 393 int roar_identify (struct roar_connection * con, const char * name) { 394 394 struct roar_message mes; 395 pid_t pid;395 uint32_t pid; 396 396 int max_len; 397 397 … … 423 423 424 424 pid = getpid(); 425 *(uint32_t*)(mes.data+1) = ROAR_HOST2NET32(pid); 426 ROAR_DBG("roar_identify(*): pid = %i", pid); 425 mes.data[1] = (pid & 0xFF000000UL) >> 24; 426 mes.data[2] = (pid & 0x00FF0000UL) >> 16; 427 mes.data[3] = (pid & 0x0000FF00UL) >> 8; 428 mes.data[4] = (pid & 0x000000FFUL) >> 0; 429 ROAR_DBG("roar_identify(*): pid = %i", (int)pid); 427 430 428 431 strncpy(mes.data+5, name, max_len);
Note: See TracChangeset
for help on using the changeset viewer.