Changeset 1453

Show
Ignore:
Timestamp:
11/22/08 10:14:45 (12 years ago)
Author:
ppalmers
Message:

cosmetics and library version check

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libffado-2.0/support/dbus/ffado-dbus-server.cpp

    r1297 r1453  
    228228{ 
    229229    struct arguments arguments; 
     230 
     231    printf("-----------------------------------------------\n"); 
     232    printf("FFADO Control DBUS service\n"); 
     233    printf("Part of the FFADO project -- www.ffado.org\n"); 
     234    printf("Version: %s\n", PACKAGE_VERSION); 
     235    printf("(C) 2008, Pieter Palmers\n"); 
     236    printf("This program comes with ABSOLUTELY NO WARRANTY.\n"); 
     237    printf("-----------------------------------------------\n\n"); 
     238 
     239    // check the library version 
     240    const char *libversion = ffado_get_version(); 
     241    const char *progversion = PACKAGE_STRING; 
     242    if(strcmp(libversion, progversion) != 0) { 
     243        printf("Library version mismatch. (required: %s, present: %s)\n", progversion, libversion); 
     244        printf("Please run this application against the exact corresponding library\n"); 
     245        printf("it was compiled for. The most common cause for this is having more\n"); 
     246        printf("than one version of libffado installed.\n\n"); 
     247        return exitfunction(-1); 
     248    } 
    230249 
    231250    // Default values. 
     
    247266        return exitfunction(-1); 
    248267    } 
    249     printMessage("FFADO Control DBUS service\n"); 
    250  
    251     debugOutput( DEBUG_LEVEL_NORMAL, "verbose level = %d\n", arguments.verbose); 
    252     debugOutput( DEBUG_LEVEL_NORMAL, "Using ffado library version: %s\n\n", ffado_get_version() ); 
    253  
    254268 
    255269    printMessage(" Discovering devices...\n");