Skip to content

Commit

Permalink
sipcapture: clang-format for coherent indentation and coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxmaniac committed May 18, 2023
1 parent c726d55 commit 7c36da9
Show file tree
Hide file tree
Showing 2 changed files with 323 additions and 302 deletions.
30 changes: 17 additions & 13 deletions src/modules/sipcapture/hep.c
Expand Up @@ -83,8 +83,9 @@ int hep_msg_received(sr_event_param_t *evp)
return hepv3_received(buf, *len, ri);
} else {

LOG(L_ERR, "ERROR: sipcapture:hep_msg_received: not supported version "
"or bad length: v:[%d] l:[%d]\n",
LOG(L_ERR,
"ERROR: sipcapture:hep_msg_received: not supported version "
"or bad length: v:[%d] l:[%d]\n",
heph->hp_v, heph->hp_l);
return -1;
}
Expand Down Expand Up @@ -112,8 +113,9 @@ int hepv2_received(char *buf, unsigned int len, struct receive_info *ri)
hl = hep_offset = sizeof(struct hep_hdr);
end = buf + len;
if(unlikely(len < hep_offset)) {
LOG(L_ERR, "ERROR: sipcapture:hep_msg_received len less than offset "
"[%i] vs [%i]\n",
LOG(L_ERR,
"ERROR: sipcapture:hep_msg_received len less than offset "
"[%i] vs [%i]\n",
len, hep_offset);
return -1;
}
Expand All @@ -129,8 +131,9 @@ int hepv2_received(char *buf, unsigned int len, struct receive_info *ri)
hl += sizeof(struct hep_ip6hdr);
break;
default:
LOG(L_ERR, "ERROR: sipcapture:hep_msg_received: unsupported "
"family [%d]\n",
LOG(L_ERR,
"ERROR: sipcapture:hep_msg_received: unsupported "
"family [%d]\n",
heph->hp_f);
return -1;
}
Expand Down Expand Up @@ -739,11 +742,10 @@ int hepv3_message_parse(char *buf, unsigned int len, sip_msg_t *msg)
else if(hg->ip_proto->data == IPPROTO_UDP)
msg->rcv.proto = PROTO_UDP;

if(payload != NULL)
{
if(payload != NULL) {
ret = len - payload_len;
msg->buf = payload;
msg->len = payload_len;
msg->len = payload_len;
}


Expand Down Expand Up @@ -787,8 +789,9 @@ int hepv2_message_parse(char *buf, unsigned int len, sip_msg_t *msg)
hl = hep_offset = sizeof(struct hep_hdr);
end = buf + len;
if(unlikely(len < hep_offset)) {
LOG(L_ERR, "ERROR: sipcapture:hep_msg_received len less than offset "
"[%i] vs [%i]\n",
LOG(L_ERR,
"ERROR: sipcapture:hep_msg_received len less than offset "
"[%i] vs [%i]\n",
len, hep_offset);
return -1;
}
Expand All @@ -804,8 +807,9 @@ int hepv2_message_parse(char *buf, unsigned int len, sip_msg_t *msg)
hl += sizeof(struct hep_ip6hdr);
break;
default:
LOG(L_ERR, "ERROR: sipcapture:hep_msg_received: unsupported "
"family [%d]\n",
LOG(L_ERR,
"ERROR: sipcapture:hep_msg_received: unsupported "
"family [%d]\n",
heph->hp_f);
return -1;
}
Expand Down

0 comments on commit 7c36da9

Please sign in to comment.