Changeset 3916:b9dead066419 in roaraudio


Ignore:
Timestamp:
06/08/10 11:54:04 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

ported RSD_IDENTITY support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroarrsound/libroarrsound.c

    r3889 r3916  
    7777 self->rsound.format          = RSD_S16_LE; 
    7878 
     79 strncpy(self->rsound.identity, "libroarrsound client", sizeof(self->rsound.identity) - 1); 
     80 self->rsound.identity[sizeof(self->rsound.identity)-1] = 0; 
     81 
    7982 return 0; 
    8083} 
     
    9598  if ( roar_vio_close(&(self->vio)) == -1 ) 
    9699   ret = -1; 
    97  
    98  if ( self->rsound.host != NULL ) 
    99   roar_mm_free(self->rsound.host); 
    100100 
    101101 if ( self->rsound.port != NULL ) 
     
    128128 
    129129    self->rsound.port = roar_mm_strdup(param); 
     130   break; 
     131  case RSD_IDENTITY: 
     132    strncpy(self->rsound.identity, param, sizeof(self->rsound.identity) - 1); 
     133    self->rsound.identity[sizeof(self->rsound.identity)-1] = 0; 
    130134   break; 
    131135  // stream settings: 
     
    169173 ROAR_DBG("libroarrsound_connect(self=%p): try to connect to: %s", self, host); 
    170174 
    171  if ( roar_simple_connect(&(self->con), host, "libroarrsound client") == -1 ) { 
     175 if ( roar_simple_connect(&(self->con), host, self->rsound.identity) == -1 ) { 
    172176  ROAR_DBG("libroarrsound_connect(self=%p) = -1 // can not connect to server", self); 
    173177  return -1; 
Note: See TracChangeset for help on using the changeset viewer.