Changeset 5155:420e4f980a8e in roaraudio


Ignore:
Timestamp:
10/15/11 16:13:55 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

run protocol functions in clear error context

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/clients.c

    r5146 r5155  
    536536 struct roar_message    m; 
    537537 struct roar_connection con; 
     538 struct roar_error_state errstate; 
     539 int command_error; 
    538540 char * data = NULL; 
    539541 int oldcmd; 
     
    572574    oldcmd = m.cmd; 
    573575 
    574     if ( (r = command_exec(id, &m, &data, flags)) == -1 ) { 
     576    roar_err_store(&errstate); 
     577    roar_err_clear_all(); 
     578    r = command_exec(id, &m, &data, flags); 
     579    roar_err_update(); 
     580    command_error = roar_error; 
     581    roar_err_restore(&errstate); 
     582 
     583    if ( r == -1 ) { 
     584     // use command_error to create an error frame here as soon as this is supported. 
    575585     m.cmd     = ROAR_CMD_ERROR; 
    576586     m.datalen = 0; 
Note: See TracChangeset for help on using the changeset viewer.