Navigation Menu

Skip to content

Commit

Permalink
Update zmsg_pushstr () function calls
Browse files Browse the repository at this point in the history
The new czmq API (2.1.0) changed the zmsg_pushstr ()
signature. Now, in order to push a variable-argument
string into a zeroMQ message it is necessary to use
zmsg_pushstrf ()
  • Loading branch information
lerwys committed Mar 31, 2014
1 parent 0fa370b commit e6b3a5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libmdp/src/engine.c
Expand Up @@ -52,7 +52,7 @@ s_order_update (order_t *self, int volume)

// Prepare and send report to the client
zmsg_t *report = zmsg_new ();
zmsg_pushstr (report, "%d", volume);
zmsg_pushstrf (report, "%d", volume);

if (self->volume == 0)
zmsg_pushstr (report, "FILL");
Expand Down
4 changes: 2 additions & 2 deletions libmdp/src/trader.c
Expand Up @@ -14,8 +14,8 @@ int main (int argc, char *argv [])
int count;
for (count = 0; count < 5; count++) {
zmsg_t *request = zmsg_new ();
zmsg_pushstr (request, "8"); // volume
zmsg_pushstr (request, "%d", count + 1000); // price
zmsg_pushstr (request, "8"); // volume
zmsg_pushstrf (request, "%d", count + 1000); // price
zmsg_pushstr (request, "SELL");
mdp_client_send (client, "NYSE", &request);
}
Expand Down

0 comments on commit e6b3a5a

Please sign in to comment.