Ignore:
Timestamp:
May 23, 2014 9:29:09 AM (10 years ago)
Author:
nanang
Message:

Misc (re #1751): Fixed uninitialized config filename in ui_write_settings() in pjsua app (thanks Lars Helgeson for the report).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_legacy.c

    r4739 r4851  
    16141614} 
    16151615 
    1616 static void ui_write_settings() 
     1616static void ui_write_settings(const char *filename) 
    16171617{ 
    16181618    char settings[2000]; 
    16191619    int len; 
    1620     char buf[128]; 
    16211620 
    16221621    len = write_settings(&app_config, settings, sizeof(settings)); 
     
    16271626        pj_status_t status; 
    16281627 
    1629         status = pj_file_open(app_config.pool, buf, PJ_O_WRONLY, &fd); 
     1628        status = pj_file_open(app_config.pool, filename, PJ_O_WRONLY, &fd); 
    16301629        if (status != PJ_SUCCESS) { 
    16311630            pjsua_perror(THIS_FILE, "Unable to open file", status); 
     
    16351634            pj_file_close(fd); 
    16361635 
    1637             printf("Settings successfully written to '%s'\n", buf); 
     1636            printf("Settings successfully written to '%s'\n", filename); 
    16381637        } 
    16391638    } 
     
    19081907        case 'f': 
    19091908            if (simple_input("Enter output filename", buf, sizeof(buf))) { 
    1910                 ui_write_settings(); 
     1909                ui_write_settings(buf); 
    19111910            } 
    19121911            break; 
Note: See TracChangeset for help on using the changeset viewer.