Changeset 5841:684c2d39f82e in roaraudio


Ignore:
Timestamp:
01/07/13 03:11:34 (7 years ago)
Author:
phi
Branch:
default
Message:

added support to terminate a server on QUIT as needed for #337

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/basic.h

    r5823 r5841  
    5454#define ROAR_CON_FLAGS_SUPPORT_EF  0x00000010UL /* Both peers support error frames */ 
    5555#define ROAR_CON_FLAGS_FREESELF    0x00000020UL /* Free the connection object */ 
     56#define ROAR_CON_FLAGS_TERMINATE   0x00000040UL /* Send TERMINATE before QUIT */ 
    5657 
    5758struct roar_message { 
  • libroar/basic.c

    r5840 r5841  
    607607  return 0; 
    608608 
     609 if ( con->flags & ROAR_CON_FLAGS_TERMINATE ) { 
     610  if ( roar_terminate(con, 1) == -1 ) { 
     611   ROAR_WARN("roar_connectionunref(con=%p{.server_name='%s'}): Can not terminate server as requested.", con, con->server_name); 
     612  } 
     613 } 
     614 
    609615 memset(&m, 0, sizeof(m)); 
    610616 
Note: See TracChangeset for help on using the changeset viewer.