mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-29 07:19:42 +08:00
Bug fix for rpc with a lot of file-descriptors
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@199 00440858-1255-0410-a3e6-75ea37f81c3a
This commit is contained in:
parent
a0398bd106
commit
54aa2a09cb
@ -1,3 +1,7 @@
|
|||||||
|
0.13:
|
||||||
|
- Fix for when the number of connections gets too great in RPC.
|
||||||
|
(Leszek Swirski) (issue #32)
|
||||||
|
|
||||||
0.12:
|
0.12:
|
||||||
- for field names which are reserved words, use the real name
|
- for field names which are reserved words, use the real name
|
||||||
given in the protobuf-c file, not the mangled name which
|
given in the protobuf-c file, not the mangled name which
|
||||||
|
@ -300,9 +300,13 @@ allocate_notifies_desired_index (RealDispatch *d)
|
|||||||
{
|
{
|
||||||
unsigned new_size = d->notifies_desired_alloced * 2;
|
unsigned new_size = d->notifies_desired_alloced * 2;
|
||||||
ProtobufC_FDNotify *n = ALLOC (new_size * sizeof (ProtobufC_FDNotify));
|
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));
|
memcpy (n, d->base.notifies_desired, d->notifies_desired_alloced * sizeof (ProtobufC_FDNotify));
|
||||||
FREE (d->base.notifies_desired);
|
FREE (d->base.notifies_desired);
|
||||||
|
memcpy (c, d->callbacks, d->notifies_desired_alloced * sizeof (Callback));
|
||||||
|
FREE (d->callbacks);
|
||||||
d->base.notifies_desired = n;
|
d->base.notifies_desired = n;
|
||||||
|
d->callbacks = c;
|
||||||
d->notifies_desired_alloced = new_size;
|
d->notifies_desired_alloced = new_size;
|
||||||
}
|
}
|
||||||
#if DEBUG_DISPATCH_INTERNALS
|
#if DEBUG_DISPATCH_INTERNALS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user