diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-10-19 22:25:33 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-10-21 20:26:01 +0200 |
commit | bc28be24d6f992618cd16e08c74bc58980591ea5 (patch) | |
tree | 25ff685f679888e7980a6f936dfd1fdb974f89f6 /src/Erebos/ICE | |
parent | 7fb2f923f3cec61964f223cef7b60c8e8bb7fc3b (diff) |
Handle error from pj_ice_strans_get_ufrag_pwd
Diffstat (limited to 'src/Erebos/ICE')
-rw-r--r-- | src/Erebos/ICE/pjproject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Erebos/ICE/pjproject.c b/src/Erebos/ICE/pjproject.c index bb06b1f..084795f 100644 --- a/src/Erebos/ICE/pjproject.c +++ b/src/Erebos/ICE/pjproject.c @@ -213,7 +213,9 @@ ssize_t ice_encode_session(pj_ice_strans * strans, char * ufrag, char * pass, pj_str_t local_ufrag, local_pwd; pj_status_t status; - pj_ice_strans_get_ufrag_pwd(strans, &local_ufrag, &local_pwd, NULL, NULL); + status = pj_ice_strans_get_ufrag_pwd( strans, &local_ufrag, &local_pwd, NULL, NULL ); + if( status != PJ_SUCCESS ) + return -status; n = snprintf(ufrag, maxlen, "%.*s", (int) local_ufrag.slen, local_ufrag.ptr); if (n < 0 || n == maxlen) |