Changeset 5603:0577a2d5a9a6 in roaraudio for plugins


Ignore:
Timestamp:
07/30/12 17:32:22 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Added roar_buffer_moveintoqueue() (Closes: #283)

Location:
plugins/universal
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/universal/protocol-daytime.c

    r5579 r5603  
    4242 memcpy(data, date, len); 
    4343 
    44  if ( *obuffer == NULL ) { 
    45   *obuffer = buf; 
    46  } else { 
    47   if ( roar_buffer_moveinto(*obuffer, &buf) == -1 ) 
    48    return -1; 
    49  } 
     44 if ( roar_buffer_moveintoqueue(obuffer, &buf) == -1 ) 
     45  return -1; 
    5046 
    5147 return 0; 
  • plugins/universal/protocol-echo.c

    r5579 r5603  
    5050 } 
    5151 
    52  if ( *obuffer == NULL ) { 
    53   *obuffer = buf; 
    54  } else { 
    55   if ( roar_buffer_moveinto(*obuffer, &buf) == -1 ) { 
    56    ROAR_DBG("_handle(client=%i, vio=%p) = -1 // error=%s(%i)", client, vio, roar_errorstring, roar_error); 
    57    return -1; 
    58   } 
    59  } 
     52 if ( roar_buffer_moveintoqueue(obuffer, &buf) == -1 ) 
     53  return -1; 
    6054 
    6155 ROAR_DBG("_handle(client=%i, vio=%p) = 0", client, vio); 
  • plugins/universal/tic-tac-toe.c

    r5579 r5603  
    8989}; 
    9090 
    91 static inline int __movein(struct roar_buffer ** buf, struct roar_buffer ** next) { 
    92  if ( *buf == NULL ) { 
    93   *buf = *next; 
    94   *next = NULL; 
    95   return 0; 
    96  } else { 
    97   return roar_buffer_moveinto(*buf, next); 
    98  } 
    99 } 
    100  
    10191static void new_game(game_state * state) { 
    10292 memset(state, _FREE, sizeof(game_state)); 
     
    237227 } 
    238228 
    239  __movein(obuffer, &buf); 
     229 _LIBROAR_IGNORE_RET(roar_buffer_moveintoqueue(obuffer, &buf)); 
    240230} 
    241231 
     
    260250 } 
    261251 
    262  __movein(obuffer, &buf); 
     252 _LIBROAR_IGNORE_RET(roar_buffer_moveintoqueue(obuffer, &buf)); 
    263253} 
    264254 
Note: See TracChangeset for help on using the changeset viewer.