Changeset 490:dc9ab0d247dc in roaraudio for roard/req.c
- Timestamp:
- 08/14/08 05:02:17 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/req.c
r486 r490 12 12 struct roar_client * c; 13 13 int max_len; 14 #ifdef SO_PEERCRED15 struct ucred cred;16 socklen_t cred_len = sizeof(cred);17 #endif18 14 19 15 if ( mes->datalen < 1 ) … … 23 19 24 20 if ( mes->data[0] == 1 ) { 25 #ifdef SO_PEERCRED26 if (getsockopt(c->fh, SOL_SOCKET, SO_PEERCRED, &cred, &cred_len) != -1) {27 if ( cred.pid != 0 ) {28 c->pid = cred.pid;29 c->uid = cred.uid;30 c->gid = cred.gid;31 }32 } else {33 ROAR_DBG("req_on_identify(): Can't get creds via SO_PEERCRED: %s", strerror(errno));34 }35 #endif36 21 if ( c->pid == -1 ) { 37 22 c->pid = ROAR_NET2HOST32(*(uint32_t*)((mes->data)+1)); … … 420 405 } 421 406 422 if ( streams_get(mes->stream, ROAR_STREAM_SERVER(&s)) == -1 ) {407 if ( streams_get(mes->stream, (struct roar_stream_server **)&s) == -1 ) { 423 408 ROAR_WARN("req_on_get_stream_para(*): request on non existing (or other error?) stream %i", mes->stream); 424 409 return -1;
Note: See TracChangeset
for help on using the changeset viewer.