Changeset 4438:cd8f86bcbadc in roaraudio


Ignore:
Timestamp:
10/09/10 15:37:12 (8 years ago)
Author:
phi
Branch:
default
Message:

use vars from configure, implement support for uname

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/Makefile

    r4437 r4438  
    1616#DEFINES        = -DDEBUG 
    1717#DEFINES        = -DMONITOR_LATENCY 
    18 PKGDEFINES= -DPACKAGE_VERSION="$(VERSION)" -DDEVICE_VENDOR_ID=$(DEV_VENDOR) -DDEVICE_VENDOR_NAME="$(DEV_VENDOR_NAME)" -DDEVICE_VENDOR_STRING="$(DEV_VENDOR_STRING)" 
     18PKGDEFINES= -DPACKAGE_VERSION="\"$(VERSION)\"" -DDEVICE_VENDOR_ID=$(DEV_VENDOR) -DDEVICE_VENDOR_NAME="\"$(DEV_VENDOR_NAME)\"" -DDEVICE_VENDOR_STRING="\"$(DEV_VENDOR_STRING)\"" 
    1919INCLUDE   = -I../include -I./include 
    2020CFLAGS   += -g -Wall -O2 $(DEFINES) $(PKGDEFINES) $(INCLUDE) $(INCPATH) 
  • roard/req.c

    r4431 r4438  
    2626#include "roard.h" 
    2727 
     28// include for uname() used by req_on_server_info() 
     29#ifdef ROAR_HAVE_UNAME 
     30#include <sys/utsname.h> 
     31#endif 
     32 
    2833static void * _dataspace(struct roar_message * mes, char ** data, uint32_t flags[2], size_t len) { 
    2934 if ( len <= LIBROAR_BUFFER_MSGDATA ) 
     
    537542 
    538543int req_on_server_info (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 
     544#ifdef ROAR_HAVE_UNAME 
     545 struct utsname utsname; 
     546#endif 
    539547 struct roar_server_info info; 
    540548 uint16_t * d16; 
     
    553561   memset(&info, 0, sizeof(info)); 
    554562 
    555    info.version = "roard/? <0/RoarAudio>"; 
     563   info.version = "roard/" PACKAGE_VERSION " <" DEVICE_VENDOR_STRING ">"; 
    556564   info.location = g_config->location; 
    557565   info.description = g_config->description; 
     566 
     567#ifdef ROAR_HAVE_UNAME 
     568   if ( uname(&utsname) == 0 ) { 
     569    info.un.sysname  = utsname.sysname; 
     570    info.un.release  = utsname.release; 
     571    info.un.nodename = utsname.nodename; 
     572    info.un.machine  = utsname.machine; 
     573   } 
     574#endif 
    558575 
    559576   if ( roar_server_info_to_mes(mes, &info) == -1 ) 
Note: See TracChangeset for help on using the changeset viewer.