Changeset 4618:950031048258 in roaraudio


Ignore:
Timestamp:
11/22/10 14:54:12 (9 years ago)
Author:
phi
Branch:
default
Message:

Corrected error codes in VS API (Closes: #90)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r4614 r4618  
    99        * Updated docs 
    1010        * Support dir parameter in OINFO command (Closes: #31) 
     11        * Corrected error codes in VS API (Closes: #90) 
    1112 
    1213v. 0.4beta1 - Mon Nov 01 2010 16:14 CET 
  • libroar/vs.c

    r4616 r4618  
    259259 file = &(vss->file_store); 
    260260 
    261  // TODO: FIXME: correct error handling bellow. 
    262  
    263  if ( roar_vio_dstr_init_defaults(&def, ROAR_VIO_DEF_TYPE_NONE, dir, 0644) == -1 ) 
    264   return -11; 
     261 _initerr(); 
     262 
     263 if ( roar_vio_dstr_init_defaults(&def, ROAR_VIO_DEF_TYPE_NONE, dir, 0644) == -1 ) { 
     264  _seterrre(); 
     265  return -1; 
     266 } 
    265267 
    266268 if ( roar_vio_open_dstr(file, filename, &def, 1) == -1 ) { 
     269  _seterrre(); 
    267270  return -1; 
    268271 } 
     
    280283   if ( codec == -1 ) { 
    281284    roar_vio_close(file); 
     285    _seterr(ROAR_ERROR_INVAL); // Other value? 
    282286    return -1; 
    283287   } 
     
    285289   if ( roar_vio_lseek(file, 0, SEEK_SET) != 0 ) { 
    286290    roar_vio_close(file); 
     291   _seterrre(); 
    287292    return -1; 
    288293   } 
     
    328333int roar_vs_close(roar_vs_t * vss, int killit, int * error) { 
    329334 if ( killit != ROAR_VS_TRUE && killit != ROAR_VS_FALSE ) { 
    330   _seterr(ROAR_ERROR_UNKNOWN); 
     335  _seterr(ROAR_ERROR_INVAL); 
    331336  return -1; 
    332337 } 
Note: See TracChangeset for help on using the changeset viewer.