[OpenSIPS-Devel] [OpenSIPS/opensips] a3b192: protos/tcp: respect async operations order

Razvan Crainea razvan at opensips.org
Thu Jan 11 07:15:45 EST 2018


  Branch: refs/heads/2.3
  Home:   https://github.com/OpenSIPS/opensips
  Commit: a3b192739fd665865579f9631cfc83639ee49854
      https://github.com/OpenSIPS/opensips/commit/a3b192739fd665865579f9631cfc83639ee49854
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2018-01-11 (Thu, 11 Jan 2018)

  Changed paths:
    M modules/proto_bin/proto_bin.c
    M modules/proto_hep/proto_hep.c
    M net/proto_tcp/proto_tcp.c

  Log Message:
  -----------
  protos/tcp: respect async operations order

In case there is a write request, before actually writing the data on
the network, check if there are any async chunks left, and make sure
they are sent before any other write happens. This is necessary to make
sure the order of the packets is respected, otherwise we might end up
with fragments of other packets in the stream.

Thanks go to Vlad Patrascu for reporting and testing this.

(cherry picked from commit 5773e65b9058643191544763e0f5ff26f5a7fb3b)




More information about the Devel mailing list