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:
lahiker42 2010-01-24 17:09:48 +00:00
parent a0398bd106
commit 54aa2a09cb
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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