Merge lp:~brianaker/gearmand/failed-encapsulation into lp:gearmand

Proposed by Brian Aker on 2013-06-15
Status: Merged
Merged at revision: 775
Proposed branch: lp:~brianaker/gearmand/failed-encapsulation
Merge into: lp:gearmand
Diff against target: 36 lines (+12/-2)
2 files modified
libgearman/client.cc (+2/-2)
libgearman/interface/packet.hpp (+10/-0)
To merge this branch: bzr merge lp:~brianaker/gearmand/failed-encapsulation
Reviewer Review Type Date Requested Status
Tangent Trunk 2013-06-15 Pending
Review via email: mp+169610@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libgearman/client.cc'
2--- libgearman/client.cc 2013-06-05 21:59:31 +0000
3+++ libgearman/client.cc 2013-06-15 09:08:28 +0000
4@@ -1605,9 +1605,9 @@
5 else if (strncmp(client->impl()->task->impl()->job_handle,
6 static_cast<char *>(client->impl()->con->_packet.arg[0]),
7 client->impl()->con->_packet.arg_size[0]) ||
8- (client->impl()->con->_packet.command != GEARMAN_COMMAND_WORK_FAIL &&
9+ (client->impl()->con->_packet.failed() == false &&
10 strlen(client->impl()->task->impl()->job_handle) != client->impl()->con->_packet.arg_size[0] - 1) ||
11- (client->impl()->con->_packet.command == GEARMAN_COMMAND_WORK_FAIL &&
12+ (client->impl()->con->_packet.failed() &&
13 strlen(client->impl()->task->impl()->job_handle) != client->impl()->con->_packet.arg_size[0]))
14 {
15 continue;
16
17=== modified file 'libgearman/interface/packet.hpp'
18--- libgearman/interface/packet.hpp 2013-05-07 11:07:18 +0000
19+++ libgearman/interface/packet.hpp 2013-06-15 09:08:28 +0000
20@@ -92,6 +92,16 @@
21
22 void free__data();
23
24+ bool failed() const
25+ {
26+ if (command == GEARMAN_COMMAND_WORK_FAIL)
27+ {
28+ return true;
29+ }
30+
31+ return false;
32+ }
33+
34 void reset()
35 {
36 if (args != args_buffer and args)

Subscribers

People subscribed via source and target branches

to all changes: