[zeromq-dev] Want to submit pull request for a feature, running into GSL/Zproject problems

Kevin Wang kevin at spikegadgets.com
Sat Sep 30 00:06:52 CEST 2017


Hi,

I've sent some emails about malamute not having the ability to remove 
subscriptions to a stream. No one answered them, so I took it into my 
own hands to learn how ZProject works and do it myself, as the 
functionality already exists, just not to the clients.

I changed the files mlm_client.xml, mlm_client.c, mlm_server.xml, 
mlm_server.c, and mlm_proto.xml.
After running GSL on them and compiling, I ran into a lot of compilation 
errors, which don't make any sense to me, all of which come from the 
mlm_proto code.

I manually edited mlm_proto.c and the feature works! But I'd like to do 
it correctly and make a pull request for this.

All I added in mlm_proto.xml was the following under stream operations:

     <message name = "STREAM CANCEL">
         Cancels and removes all subscriptions to a stream .
         Server replies with OK or ERROR.
         <field name = "stream" type = "string">Name of stream</field>
     </message>

Generating the c code and compiling resulted in errors like this:

src/mlm_proto.c: In function ‘mlm_proto_new_zpl’:
src/mlm_proto.c:488:40: error: passing argument 1 of ‘zmsg_decode’ from 
incompatible pointer type [-Werror=incompatible-pointer-types]
              zmsg_t *msg = zmsg_decode (bvalue, strlen (s) / 2);
                                         ^
In file included from /usr/local/include/czmq_library.h:156:0,
                  from /usr/local/include/czmq.h:37,
                  from src/../include/mlm_library.h:24,
                  from src/../include/malamute.h:17,
                  from src/mlm_classes.h:24,
                  from src/mlm_proto.c:35:
/usr/local/include/zmsg.h:48:5: note: expected ‘zframe_t * {aka struct 
_zframe_t *}’ but argument is of type ‘byte * {aka unsigned char *}’
      zmsg_decode (zframe_t *frame);

Following the line numbers, I see that a few new functions were defined, 
like mlm_proto_new_zpl(zconfig_t *config).

Can anybody help guide me through this??

Many thanks,
Kevin



More information about the zeromq-dev mailing list