Skip to content

Commit

Permalink
sdp: fix logging medias
Browse files Browse the repository at this point in the history
As introduced by bff790b

Also handles errors in the caller

Ticket: 6994
  • Loading branch information
catenacyber authored and victorjulien committed Apr 30, 2024
1 parent df8568e commit c53e9ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust/src/sdp/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ fn log_media_description(
}
js.close()?;
}
js.close()?;
}
js.close()?;

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions rust/src/sip/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn log(tx: &SIPTransaction, js: &mut JsonBuilder) -> Result<(), JsonError> {
.set_string("version", &req.version)?;

if let Some(sdp_body) = &req.body {
let _ = sdp_log(sdp_body, js);
sdp_log(sdp_body, js)?;
}
}

Expand All @@ -43,7 +43,7 @@ fn log(tx: &SIPTransaction, js: &mut JsonBuilder) -> Result<(), JsonError> {
.set_string("code", &resp.code)?
.set_string("reason", &resp.reason)?;
if let Some(sdp_body) = &resp.body {
let _ = sdp_log(sdp_body, js);
sdp_log(sdp_body, js)?;
}
}

Expand Down

0 comments on commit c53e9ac

Please sign in to comment.