Bug #511 » S3_2-json-protocol-free-json-object-when-discarding-info-.patch
common/generate_packets.py | ||
---|---|---|
{fl}\
|
||
{s}\
|
||
{before_return}\
|
||
return 0;
|
||
SEND_PACKET_DISCARD();
|
||
}}
|
||
""".format(fl = fl, s = s, before_return = before_return)
|
||
common/networking/packets.h | ||
---|---|---|
return send_packet_data(pc, buffer, size, packet_type); \
|
||
}
|
||
#define SEND_PACKET_DISCARD() \
|
||
return 0
|
||
#define RECEIVE_PACKET_START(packet_type, result) \
|
||
struct data_in din; \
|
||
struct packet_type packet_buf, *result = &packet_buf; \
|
common/networking/packets_json.h | ||
---|---|---|
return send_packet_data(pc, buffer, size, packet_type); \
|
||
}
|
||
#define SEND_PACKET_DISCARD() \
|
||
{ \
|
||
if (pc->json_mode) { \
|
||
json_decref(dout.json); \
|
||
} \
|
||
return 0; \
|
||
}
|
||
#define RECEIVE_PACKET_START(packet_type, result) \
|
||
struct packet_type packet_buf, *result = &packet_buf; \
|
||
struct data_in din; \
|