549 Commits

Author SHA1 Message Date
Robert Edmonds
9f39b7621e LICENSE: add a statement about the ownership of protoc-c output
Signed-off-by: Dave Benson <lahiker42@gmail.com>
2013-12-09 14:09:10 -05:00
Robert Edmonds
db4ab0ee85 ChangeLog: fix trailing whitespace 2013-12-09 14:08:57 -05:00
Ilya Lipnitskiy
ffb1c2462a protobuf-c/protobuf-c.c: add explicit casts in parsing functions for
better compatibility with 8- and 16-bit platforms (integrate fixes
from #47)
2013-12-03 22:40:40 -08:00
Ilya Lipnitskiy
5b3ac9ca97 protobuf-c.c: wrap DO_ALLOC macro in a do {} while(0) statement 2013-12-02 15:43:08 -08:00
Ilya Lipnitskiy
3ec5aa1256 protobuf-c-rpc/protobuf-c-rpc.c: remove the duplicate call to
protobuf_c_dispatch_close_fd() (fixes #82)
2013-11-27 16:13:24 -08:00
Ilya Lipnitskiy
b5b1d4e907 protobuf-c/protobuf-c.{c,h}: remove the unused protobuf_c_system_allocator 2013-11-27 15:53:56 -08:00
Ilya Lipnitskiy
b1056e922a protobuf-c-rpc/protobuf-c-rpc.c: perform a more thorough message
check for server closures (responses) to not crash the server in case of
a malformed message (related to #76)
2013-11-27 15:21:40 -08:00
Ilya Lipnitskiy
fb39c17616 protobuf-c/protobuf-c.c: add a few extra checks to
protobuf_c_message_check
2013-11-27 15:21:02 -08:00
Ilya Lipnitskiy
746ea972bc protobuf-c/protobuf-c.c: fix a logic error when a failed merge would
leave a dangling pointer to the parsed submessage
2013-11-22 17:37:09 -08:00
Ilya Lipnitskiy
7b665e9ce4 protobuf-c/protobuf-c.c: add return code check to merge_messages calls 2013-11-22 17:31:00 -08:00
Robert Edmonds
54464b90c4 ChangeLog: Issue #91 2013-11-22 19:48:44 -05:00
Ilya Lipnitskiy
b00f6d221c t/generated-code2/test-generated-code2.c: Rename test_optional_merge to
test_field_merge
2013-11-22 16:35:19 -08:00
Ilya Lipnitskiy
f4b9fd20a5 protobuf-c/protobuf-c.c: add functionality to merge multiple instances
of the same field on the wire (Fixes #91)
t/generated-code2/test-generated-code2.c: add a test case for merging
messages
t/test-full.proto: expand message definitions to test for merging nested
messages
2013-11-22 15:34:07 -08:00
Robert Edmonds
1f5e813fe7 protobuf-c/protobuf-c.c: the no_unpacking_needed case only executes on little endian 2013-11-21 17:13:11 -05:00
Robert Edmonds
49faa55bc2 IS_LITTLE_ENDIAN -> !defined(WORDS_BIGENDIAN)
this simplifies the AC_C_BIGENDIAN invocation.
2013-11-21 17:12:00 -05:00
Robert Edmonds
97c43baba3 there's no protobuf-c-config.h file with the new build system 2013-11-20 15:30:15 -05:00
Robert Edmonds
7c7cc361b5 ChangeLog: 0.16 updates 2013-11-20 15:04:46 -05:00
Robert Edmonds
3b3f78ce5d Makefile.am: bump libprotobuf-c SONAME 2013-11-20 15:04:24 -05:00
Robert Edmonds
79f2767e1c remove alloca() remnants 2013-11-20 14:41:54 -05:00
Ilya Lipnitskiy
5f122c44e0 protoc-c/main.cc: add a version string to protoc-c based on the
PACKAGE_STRING provided by autotools (fixes #52)
2013-11-19 00:11:05 -08:00
Ilya Lipnitskiy
59688a92b3 protobuf-c-rpc/protobuf-c-rpc.c: free the timer created by autoreconnect
in case the client has failed to connect and got destroyed (fixes #70)

protobuf-c-rpc/t/test-rpc.c: add a test case for #70
2013-11-18 22:22:46 -08:00
Ilya Lipnitskiy
5d74333219 protobuf-c-rpc/protobuf-c-rpc.c: handle server responses with NULL
messages on the client side (fixes #78)

protobuf-c-rpc/t/test-rpc.c: add a test case for #78
2013-11-18 22:14:36 -08:00
Ilya Lipnitskiy
4610a0d40e protobuf-c-rpc/protobuf-c-rpc.c: rename AF_LOCAL to AF_UNIX (Fixes #100) 2013-11-18 22:03:42 -08:00
Ilya Lipnitskiy
e9529ac463 .gitignore: Ignore temporary files that end with ~ 2013-11-18 21:08:53 -08:00
Ilya Lipnitskiy
0508aa0d6e protoc-c/c_file.cc: Add source .proto file name to the generated files 2013-11-18 21:05:44 -08:00
Robert Edmonds
2689e06257 README.md: add a section on contributing patches 2013-11-18 20:41:22 -05:00
Robert Edmonds
23c9b03ea7 update copyright and license statements throughout
per https://code.google.com/p/protobuf/source/detail?r=50, the license
on google-originated protobuf code was switched from Apache-2.0 to
BSD-3-Clause (so-called "New BSD" license). update any of the google
license statements to use this new license.

per email with dave, drop the third clause on his BSD-3-Clause license,
so this now becomes BSD-2-Clause.

make sure to use consistent indentation and wrapping throughout.
2013-11-18 20:25:34 -05:00
Robert Edmonds
92b11ac5db protobuf-c/protobuf-c.h: update PROTOBUF_C_MINOR 2013-11-18 18:17:10 -05:00
Robert Edmonds
12b18decb2 README.md: expand the overview, and add a brief build/usage synopsis 2013-11-18 18:14:46 -05:00
Robert Edmonds
aab12f20bc .travis.yml: use system protobuf packages and build using distcheck
the change that required protobuf >= 2.5.0 has been reverted, so there's
no need to build protobuf from source. use the system protobuf packages
instead.

also use distcheck to build and check the distribution. this will run
the test suite and perform various other checks. it will also perform a
VPATH build using the distribution tarball, which will catch any files
present in the git repository but inadvertently not distributed in the
tarball.

also test the build when configured with "--enable-rpc".
2013-11-18 14:35:52 -05:00
Robert Edmonds
9e86cda282 Makefile.am: protobuf-c-rpc/: make sure that the gsk* header files get distributed 2013-11-18 14:32:57 -05:00
Robert Edmonds
c64da22059 configure.ac: add the protobuf version to the configure summary 2013-11-18 14:32:31 -05:00
Robert Edmonds
4142d7e92e build system: remove --disable-protoc option
for some reason, "make distcheck" fails when the build is configured
with --disable-protoc. i haven't been able to track down the root cause
(it appears the build is trying to generate the generated pb-c files for
the test cases, but the test cases should be disabled when
--disable-protoc is specified). so, remove the --disable-protoc option.
libprotobuf-c should always be tested as part of a build, and this can't
be done unless protoc-c is built. this also reduces the number of build
combinations that need to be tested.
2013-11-18 14:24:05 -05:00
Robert Edmonds
8551bf637d configure.ac: print out C++ related build flags 2013-11-18 13:59:17 -05:00
Robert Edmonds
43b94a4bc4 fix VPATH builds
this commit fixes VPATH builds where the build tree is separate from the
source tree. this will allow us to run "make distcheck".
2013-11-18 13:53:28 -05:00
Robert Edmonds
3128296851 t/test-full.proto: revert 'option allow_alias = true;'
this option is only supported by the upstream protobuf compiler starting
with version 2.5.0. this version is not yet widely available in the
debian/ubuntu repositories, and we would like to avoid breaking the
build on those platforms with the distribution version of protobuf
installed, so revert the following commits:

 - 5ee9c03478ea13bba03e7d7edacf723f324200c2
 - 84e41e7329f1f0fc09b41ee96e17b28a792cefcf
2013-11-18 13:00:44 -05:00
Ilya Lipnitskiy
2dfe54f2ed Add a README 2013-11-18 00:12:57 -08:00
Ilya Lipnitskiy
fce41f255e Add a travis-CI config file 2013-11-18 00:09:48 -08:00
Ilya Lipnitskiy
84e41e7329 Add version check for the protobuf package (needed for allow_alias option to work) 2013-11-17 23:31:39 -08:00
Robert Edmonds
0bba85ec4b gitignore: ignore output from the test suite 2013-11-16 18:09:47 -05:00
Robert Edmonds
5ee9c03478 t/test-full.proto: add 'option allow_alias = true;' to silence warnings from the protobuf compiler 2013-11-16 18:08:51 -05:00
Robert Edmonds
40f31f2aff new build system 2013-11-16 18:08:40 -05:00
Robert Edmonds
01831e4355 protobuf-c-rpc/t/test-rpc.c: fix include paths 2013-11-16 17:57:22 -05:00
Robert Edmonds
cd2c8a5835 t/: fix paths to generated protobuf code 2013-11-16 17:32:26 -05:00
Robert Edmonds
c4ae1c1432 t/: fix include paths 2013-11-16 17:13:21 -05:00
Robert Edmonds
6f7862963e protoc-c/c_file.cc: fix include path in generated output 2013-11-16 17:12:01 -05:00
Robert Edmonds
653c04ea2c protoc-c/: fix include paths 2013-11-16 17:11:48 -05:00
Robert Edmonds
d95640c924 protoc-c/: remove unused .cc files 2013-11-16 17:10:14 -05:00
Robert Edmonds
dcbf5367b9 rpc/ -> protobuf-c-rpc/ 2013-11-16 15:54:49 -05:00
Robert Edmonds
bbed775dae compiler/ -> protoc-c/ 2013-11-16 15:48:12 -05:00
Robert Edmonds
07b3a39c6c rpc/: move sctp-rpc and simplerpc here 2013-11-15 22:23:16 -05:00
Robert Edmonds
10ba5c5ce6 rpc/example/: move rpc example code here 2013-11-15 22:21:14 -05:00
Robert Edmonds
b198643a71 rpc/t/: move rpc test code here 2013-11-15 22:17:57 -05:00
Robert Edmonds
0ca43f594a t/: move test code here 2013-11-15 22:17:30 -05:00
Robert Edmonds
6211cec696 compiler/: move compiler code here 2013-11-15 22:12:02 -05:00
Robert Edmonds
d0e11c4438 protobuf-c/: move library code here 2013-11-15 22:09:25 -05:00
Robert Edmonds
1d3e264ee0 protobuf-c-parser.h: remove
as far as i can tell, this code is not used anywhere.
2013-11-15 22:08:02 -05:00
Robert Edmonds
3dafa86ddf rpc/: move rpc code here 2013-11-15 22:07:30 -05:00
Robert Edmonds
12215b4774 remove the current build system 2013-11-15 21:49:56 -05:00
lahiker42@gmail.com
1d1ad931df Add protobuf_c_message_check()
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@332 00440858-1255-0410-a3e6-75ea37f81c3a
2013-06-04 15:45:23 +00:00
lahiker42@gmail.com
925c567525 ok, try to be even more explicit
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@331 00440858-1255-0410-a3e6-75ea37f81c3a
2011-12-21 02:28:59 +00:00
lahiker42@gmail.com
a9542483a9 move time-sync to front of dispatch
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@330 00440858-1255-0410-a3e6-75ea37f81c3a
2011-12-09 03:18:09 +00:00
lahiker42@gmail.com
d6857c2e9c ensure enums are the size of ints
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@329 00440858-1255-0410-a3e6-75ea37f81c3a
2011-11-12 02:32:22 +00:00
lahiker42@gmail.com
4800e0fba0 include <limits.h>; comments
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@328 00440858-1255-0410-a3e6-75ea37f81c3a
2011-11-12 02:31:44 +00:00
lahiker42@gmail.com
ccfedab5d3 switch to using a fixed-size hash-table for detecting missing required fields,
it is only approximate now, but it should be good enough

git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@327 00440858-1255-0410-a3e6-75ea37f81c3a
2011-11-02 14:16:19 +00:00
lahiker42@gmail.com
b69033fd7e yeah.. not a bug
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@326 00440858-1255-0410-a3e6-75ea37f81c3a
2011-11-02 04:33:24 +00:00
lahiker42@gmail.com
248eae1d07 use an approximate hash for detecting required fields
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@325 00440858-1255-0410-a3e6-75ea37f81c3a
2011-11-02 04:22:53 +00:00
lahiker42@gmail.com
b0d7d4a023 Add version macros and library globals.
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@324 00440858-1255-0410-a3e6-75ea37f81c3a
2011-11-02 03:45:35 +00:00
lahiker42@gmail.com
64fad6b7f3 attribute recent memory leak fix
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@323 00440858-1255-0410-a3e6-75ea37f81c3a
2011-11-02 03:16:25 +00:00
lahiker42@gmail.com
97f8f921fc Bugs: committed some Allocator brainstorming accidentally.
Fixed Issue #63, which was introduced when
"required" fields were verified. (Introduced in protobuf-c 0.14)



git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@322 00440858-1255-0410-a3e6-75ea37f81c3a
2011-11-02 03:11:53 +00:00
lahiker42@gmail.com
baba8cd71d Bug fix (srobbins, see Issue 68 Comment 1)
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@321 00440858-1255-0410-a3e6-75ea37f81c3a
2011-11-02 02:32:57 +00:00
lahiker42@gmail.com
b84162824e note bug fix.
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@320 00440858-1255-0410-a3e6-75ea37f81c3a
2011-11-02 02:26:08 +00:00
lahiker42@gmail.com
eac0e3f4e2 - Handle POLLHUP correctly.
- Memory allocation bugs.
- Places where d->fd_map was cached onto the stack inappropriately.


git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@319 00440858-1255-0410-a3e6-75ea37f81c3a
2011-11-02 02:25:28 +00:00
lahiker42
6818e9371f Include license in tarball.
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@316 00440858-1255-0410-a3e6-75ea37f81c3a
2011-04-21 16:45:02 +00:00
lahiker42@gmail.com
cc2fc7d38a Mistakenly set the wrong idle function.
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@310 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-28 13:32:01 +00:00
lahiker42@gmail.com
ba8c7bee2e bug fix
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@293 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-24 15:13:03 +00:00
lahiker42@gmail.com
5fe8eb694a typo
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@292 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-24 02:12:31 +00:00
lahiker42
5787693b48 Add a way to support multiple threads.
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@289 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-21 22:25:28 +00:00
lahiker42
75fa6665de reentrance guard fix
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@288 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-21 21:28:39 +00:00
lahiker42@gmail.com
16b1297cf3 ..
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@287 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-20 02:37:08 +00:00
lahiker42@gmail.com
c6b488d3e1 Clear changes isn't necessary b/c n_changes is cleared in dispatch_dispatch.
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@286 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-16 03:31:09 +00:00
lahiker42
a3d8725340 Be more permissive in accepting packed data for non-packed repeated members.
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@285 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-15 19:23:57 +00:00
lahiker42
0ec4e41507 Switch to New BSD license.
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@284 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-15 19:14:43 +00:00
lahiker42
b9ad3cc11a Add --autoreconnect option.
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@283 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-15 18:16:00 +00:00
lahiker42
17bdf7caf5 Remove printouts.
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@282 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-15 18:03:03 +00:00
lahiker42
88620efbba Remove incorrect assertion.
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@281 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-15 18:00:15 +00:00
lahiker42
ddabb041b3 upgrade
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@278 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-10 19:15:44 +00:00
lahiker42
831accbd62 Add cmake support.
Minor cleanups to dispatch, set "has_idle" correctly.


git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@276 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-10 19:12:35 +00:00
lahiker42
8c7d949744 Make "has_idle" accurate.
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@275 00440858-1255-0410-a3e6-75ea37f81c3a
2011-03-10 19:00:08 +00:00
lahiker42@gmail.com
4e281490cd Various cleanups, mostly due to Pop Stelian.
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@269 00440858-1255-0410-a3e6-75ea37f81c3a
2010-12-18 23:51:37 +00:00
lahiker42
e03c352fa2 Do not crash if def_bd == NULL (!)
Patch by Andrei Nigmatulin.


git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@266 00440858-1255-0410-a3e6-75ea37f81c3a
2010-11-01 18:38:31 +00:00
lahiker42
3695444f6a ...
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@262 00440858-1255-0410-a3e6-75ea37f81c3a
2010-09-17 14:17:41 +00:00
lahiker42
00b5c56f69 make protobuf_c_message_init() into a function (Issue #49)
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@257 00440858-1255-0410-a3e6-75ea37f81c3a
2010-09-15 15:05:53 +00:00
lahiker42
e9cfa2dd98 git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@249 00440858-1255-0410-a3e6-75ea37f81c3a 2010-09-03 21:21:08 +00:00
lahiker42
6c49e55c61 ..
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@248 00440858-1255-0410-a3e6-75ea37f81c3a
2010-09-03 20:38:57 +00:00
lahiker42
56f2af6435 .
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@247 00440858-1255-0410-a3e6-75ea37f81c3a
2010-09-01 04:30:30 +00:00
lahiker42
0057cd3adc "typo"
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@246 00440858-1255-0410-a3e6-75ea37f81c3a
2010-08-27 02:32:29 +00:00
lahiker42
d9b6f6566f release 0.14
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@245 00440858-1255-0410-a3e6-75ea37f81c3a
2010-08-26 04:22:11 +00:00
lahiker42
7806546457 Finish up ChangeLog
git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@243 00440858-1255-0410-a3e6-75ea37f81c3a
2010-08-26 04:15:51 +00:00
lahiker42
e30ec5f71e protobuf_c_unpack_message():
Insist that required fields be represented in the packed message.


git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@242 00440858-1255-0410-a3e6-75ea37f81c3a
2010-08-25 21:16:10 +00:00