Changeset 5371:309ea408873b in roaraudio for libroar/error.c


Ignore:
Timestamp:
12/21/11 18:58:36 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added new error codes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/error.c

    r5312 r5371  
    10561056  {ROAR_ERROR_CONNRSTNET,  "Connection reset by network"}, 
    10571057  {ROAR_ERROR_CONNABORTED, "Connection aborted"}, 
     1058  {ROAR_ERROR_BADHOST,     "Bad host software or hardware"}, 
     1059  {ROAR_ERROR_SWITCHPROTO, "Switch protocol"}, 
     1060  {ROAR_ERROR_MOVEDPERM,   "Moved Permanently"}, 
     1061  {ROAR_ERROR_MOVEDTEMP,   "Moved Temporary"}, 
     1062  {ROAR_ERROR_USEPROXY,    "Use Proxy server"}, 
     1063  {ROAR_ERROR_SEEOTHER,    "See other resource"}, 
     1064  {ROAR_ERROR_GONE,        "Resource gone"}, 
    10581065  {-1, NULL} 
    10591066 }, msgs_funny[] = { 
     
    11461153//  {ROAR_ERROR_CONNRSTNET,  "Connection reset by network"}, 
    11471154//  {ROAR_ERROR_CONNABORTED, "Connection aborted"}, 
     1155//  {ROAR_ERROR_BADHOST,     "Bad host software or hardware"}, 
     1156//  {ROAR_ERROR_SWITCHPROTO, "Switch protocol"}, 
     1157//  {ROAR_ERROR_MOVEDPERM,   "Moved Permanently"}, 
     1158//  {ROAR_ERROR_MOVEDTEMP,   "Moved Temporary"}, 
     1159//  {ROAR_ERROR_USEPROXY,    "Use Proxy server"}, 
     1160//  {ROAR_ERROR_SEEOTHER,    "See other resource"}, 
     1161//  {ROAR_ERROR_GONE,        "Resource gone"}, 
    11481162  {-1, NULL} 
    11491163 }; 
    11501164 int i; 
    11511165 
    1152  if ( config->opmode == ROAR_LIBROAR_CONFIG_OPMODE_MS ) 
    1153   for (i = 0; msgs[i].msg != NULL; i++) 
    1154    if ( msgs[i].err == error ) 
     1166 if ( config->opmode == ROAR_LIBROAR_CONFIG_OPMODE_MS ) { 
     1167  for (i = 0; msgs[i].msg != NULL; i++) { 
     1168   if ( msgs[i].err == error ) { 
    11551169    return roar_error2str_ms(error, msgs[i].msg); 
     1170   } 
     1171  } 
     1172  return roar_error2str_ms(error, "<<<unknown error>>>"); 
     1173 } 
    11561174 
    11571175 if ( config->opmode == ROAR_LIBROAR_CONFIG_OPMODE_FUNNY ) 
Note: See TracChangeset for help on using the changeset viewer.