MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / bin_skip_int

Function bin_skip_int

bin_interface.c:274–285  ·  view source on GitHub ↗

* skips @count integers from the current position in the received binary packet * * @return: * 0: success * < 0: error, buffer limit reached */

Source from the content-addressed store, hash-verified

272 * < 0: error, buffer limit reached
273 */
274int bin_skip_int(bin_packet_t *packet, int count)
275{
276 if (packet->front_pointer - packet->buffer.s + count * sizeof(int) >
277 packet->buffer.len) {
278 packet->front_pointer = packet->buffer.s + packet->buffer.len;
279 LM_ERR("Buffer limit reached\n");
280 return -1;
281 }
282 packet->front_pointer += count * sizeof(int);
283
284 return 0;
285}
286
287/*
288 * skips @count strings from the current position in a received binary packet

Callers 4

unpack_update_fieldsFunction · 0.85
entity_event_receivedFunction · 0.85
dlg_replicated_updateFunction · 0.85
receive_prof_replFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected