Changeset 312:66187dd66c39
- Timestamp:
- 10/17/08 18:22:22
(3 months ago)
- Author:
- vadim@mbdsys.com
- Message:
added add group error display
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r311 |
r312 |
|
| 2223 | 2223 | |
|---|
| 2224 | 2224 | |
|---|
| | 2225 | #ifdef h_errno |
|---|
| | 2226 | void xperror(const char *text) |
|---|
| | 2227 | { |
|---|
| | 2228 | int ecode = h_errno - WSABASEERR; |
|---|
| | 2229 | ph_printf("%s Winsock error: %d\n", text, ecode) ; |
|---|
| | 2230 | } |
|---|
| | 2231 | #else |
|---|
| | 2232 | void xperror(const char *text) |
|---|
| | 2233 | { |
|---|
| | 2234 | ph_printf("%s error %s\n", text, strerror(errno)); |
|---|
| | 2235 | } |
|---|
| | 2236 | #endif |
|---|
| | 2237 | |
|---|
| | 2238 | |
|---|
| 2225 | 2239 | int ph_media_setup_mcast_send(int fd, ph_mstream_params_t *sp) |
|---|
| 2226 | 2240 | { |
|---|
| … | … | |
| 2237 | 2251 | mreq.imr_interface.s_addr=htonl(INADDR_ANY); |
|---|
| 2238 | 2252 | if (setsockopt(fd,IPPROTO_IP,IP_ADD_MEMBERSHIP,&mreq,sizeof(mreq)) < 0) |
|---|
| 2239 | | return -1; |
|---|
| 2240 | | |
|---|
| | 2253 | { |
|---|
| | 2254 | xperror("Attaching to multicast group"); |
|---|
| | 2255 | return -1; |
|---|
| | 2256 | } |
|---|
| 2241 | 2257 | return 0; |
|---|
| 2242 | 2258 | |
|---|