Skip to content

Commit

Permalink
Fix pjsua sample app user agent (#4296)
Browse files Browse the repository at this point in the history
  • Loading branch information
sauwming authored Feb 6, 2025
1 parent c53ace9 commit 65c4bc9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pjsip-apps/src/pjsua/pjsua_app_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1606,8 +1606,15 @@ static void default_config()
pjsua_app_config *cfg = &app_config;

pjsua_config_default(&cfg->cfg);
pj_ansi_snprintf(tmp, sizeof(tmp), "PJSUA v%s %s", pj_get_version(),
pj_ansi_snprintf(tmp, sizeof(tmp), "PJSUA/v%s %s", pj_get_version(),
pj_get_sys_info()->info.ptr);
/* System info may contain more than one SLASH which doesn't conform
* with the RFC 3261, so just replace it with white space.
*/
for (i = sizeof("PJSUA/") + 1; ;i++) {
if (tmp[i] == 0) break;
if (tmp[i] == '/') tmp[i] = ' ';
}
pj_strdup2_with_null(app_config.pool, &cfg->cfg.user_agent, tmp);

pjsua_logging_config_default(&cfg->log_cfg);
Expand Down

0 comments on commit 65c4bc9

Please sign in to comment.