Changeset 312:66187dd66c39

Show
Ignore:
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
  • phapi/phmedia-audio.c

    r311 r312  
    22232223 
    22242224 
     2225#ifdef h_errno 
     2226void xperror(const char *text) 
     2227{ 
     2228       int ecode = h_errno - WSABASEERR; 
     2229       ph_printf("%s Winsock error: %d\n", text, ecode) ; 
     2230} 
     2231#else 
     2232void xperror(const char *text) 
     2233{ 
     2234  ph_printf("%s error %s\n", text, strerror(errno)); 
     2235} 
     2236#endif 
     2237 
     2238 
    22252239int ph_media_setup_mcast_send(int fd, ph_mstream_params_t *sp) 
    22262240{ 
     
    22372251     mreq.imr_interface.s_addr=htonl(INADDR_ANY); 
    22382252     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       } 
    22412257     return 0; 
    22422258