Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZMQ: fixed warnings #115

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

ZMQ: fixed warnings #115

wants to merge 23 commits into from

Conversation

lmesz
Copy link
Contributor

@lmesz lmesz commented Jan 13, 2015

Hali,

Pleases review the warning fixes.

Thanks

{
LogTransportZMQ *self = (LogTransportZMQ *) s;
return zmq_recv(self->socket, buf, buflen, ZMQ_DONTWAIT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the space? It is not a compile warning correction, is it?

@juhaszviktor
Copy link
Contributor

Thank you very much for your contribution!

There is still only one compile warning. (zmq-grammar
See the travis log.
zmq-grammar.y:379:37: warning: assignment makes pointer from integer without a cast [enabled by default]

Thanks for your help :)

@lmesz
Copy link
Contributor Author

lmesz commented Jan 19, 2015

Hali,

Yes it was right about the recv(). And fixed some memory leaks. Please check them.

@czanik
Copy link
Member

czanik commented Jan 20, 2015

I did a compile using the two patches, but I still receive this error in the post build checks:

[ 26s] E: syslog-ng-incubator 64bit-portability-issue modules/zmq/zmq-grammar.y:379

Looking at the build logs:

[ 22s] CC modules/zmq/modules_zmq_libzmq_la-zmq-grammar.lo
[ 22s] modules/zmq/zmq-grammar.y: In function 'zmq_parse':
[ 22s] modules/zmq/zmq-grammar.y:379:13: warning: implicit declaration of function 'zmq_sd_new' [-Wimplicit-function-declaration]
[ 22s] last_driver = *instance = zmq_sd_new(configuration);
[ 22s] ^
[ 22s] modules/zmq/zmq-grammar.y:379:37: warning: assignment makes pointer from integer without a cast [enabled by default]
[ 22s] last_driver = *instance = zmq_sd_new(configuration);
[ 22s] ^

@lmesz
Copy link
Contributor Author

lmesz commented Jan 20, 2015

Upsz okay it is still not complete I will fix it also

 * In the source case syslog-ng use pull socket. When you use pull socket you must connect to socket instead of bind and the other part has to bind.
 * E.g.: pull -> connect | push -> bind
 * Remove the lot of c test scripts and use python instead.
… create_zmq_context

 * Bug: errno wasn't set to 0 before the creation of zmq socket. So if failed to create first zmq-socket the second followed it because the error variable contained the first socket error number.
 * function test script: changed default port from 8888 to 5558 to be symetric with the source code
…d_* and followed the changes in test and module header
 * fixed a leak around insert, syslog-ng didn't free the result if the insertion to zmq_queue() was successful
 * made the function names consistent
… to changed to term, but now the packaged libzmq doesn not support this function
 * ZMQ contains flow-control itself
 * The queue is necessary to set path_options to not bother about
   acknowledgement
 * Previously there was a bug which ended in a segfault. After the first
   reload and message sending syslog-ng crashed because the bookmark
   wasn't set properly.
@mochrul
Copy link
Collaborator

mochrul commented Jul 28, 2017

@lmesz please rebase your patch. Currently, this PR has conflicting files and therefore cannot be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants