diff --git a/ChangeLog b/ChangeLog index 3c2e85d..7203589 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +0.13: + - Fix for when the number of connections gets too great in RPC. + (Leszek Swirski) (issue #32) + 0.12: - for field names which are reserved words, use the real name given in the protobuf-c file, not the mangled name which diff --git a/src/google/protobuf-c/protobuf-c-dispatch.c b/src/google/protobuf-c/protobuf-c-dispatch.c index 7a17b74..425c877 100644 --- a/src/google/protobuf-c/protobuf-c-dispatch.c +++ b/src/google/protobuf-c/protobuf-c-dispatch.c @@ -300,9 +300,13 @@ allocate_notifies_desired_index (RealDispatch *d) { unsigned new_size = d->notifies_desired_alloced * 2; ProtobufC_FDNotify *n = ALLOC (new_size * sizeof (ProtobufC_FDNotify)); + Callback *c = ALLOC (new_size * sizeof (Callback)); memcpy (n, d->base.notifies_desired, d->notifies_desired_alloced * sizeof (ProtobufC_FDNotify)); FREE (d->base.notifies_desired); + memcpy (c, d->callbacks, d->notifies_desired_alloced * sizeof (Callback)); + FREE (d->callbacks); d->base.notifies_desired = n; + d->callbacks = c; d->notifies_desired_alloced = new_size; } #if DEBUG_DISPATCH_INTERNALS