Skip to content

Commit

Permalink
Get rid of excess brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
ycherniavskyi committed Jun 24, 2024
1 parent 5c3faef commit 2dc0e05
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/plugins/janus_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1829,18 +1829,16 @@ static void janus_sip_sofia_logger_siptrace_single_log_callback(void *stream, ch
if(strstr(buffer, "OPTIONS") == buffer)
return;
/* Search for the Call-ID header and extract its value if it exists */
{
char *from = strstr(buffer, "Call-ID: ");
if(from) {
char *start = from + 9;
if(start) {
char *end = strchr(start, '\n');
if(end) {
size_t count = end - start;
count = count >= sizeof(call_id) ? sizeof(call_id) - 1 : count;
memcpy(call_id, start, count);
call_id[count] = '\0';
}
char *from = strstr(buffer, "Call-ID: ");
if(from) {
char *start = from + 9;
if(start) {
char *end = strchr(start, '\n');
if(end) {
size_t count = end - start;
count = count >= sizeof(call_id) ? sizeof(call_id) - 1 : count;
memcpy(call_id, start, count);
call_id[count] = '\0';
}
}
}
Expand Down

0 comments on commit 2dc0e05

Please sign in to comment.