This commit is contained in:
simon.kagstrom 2010-02-06 16:22:52 +00:00
parent 43070ad2d9
commit c8c231ebb2
2 changed files with 3 additions and 2 deletions

View File

@ -969,8 +969,8 @@ bool Network::AppendScreenshot(NetworkUpdatePeerInfo *pi)
data = DataStore::ds->embedData(png, sz); data = DataStore::ds->embedData(png, sz);
if (!data) if (!data)
goto out_png; goto out_png;
ud = InitNetworkUpdate(this->ud, 0, sizeof(NetworkUpdate) + ud = InitNetworkUpdate(this->ud, REGISTER_DATA,
sizeof(NetworkUpdateDataStore) + sz); sizeof(NetworkUpdate) + sizeof(NetworkUpdateDataStore) + sz);
dsu = (NetworkUpdateDataStore *)ud->data; dsu = (NetworkUpdateDataStore *)ud->data;
dsu->key = data->key; dsu->key = data->key;
dsu->metadata = data->metadata; dsu->metadata = data->metadata;

View File

@ -34,6 +34,7 @@ typedef enum
ACK = 94, /* Answer to broker */ ACK = 94, /* Answer to broker */
BANDWIDTH_PING = 92, /* Large packet to calculate bandwidth */ BANDWIDTH_PING = 92, /* Large packet to calculate bandwidth */
BANDWIDTH_ACK = 91, /* Answer to BANDWIDTH_PING */ BANDWIDTH_ACK = 91, /* Answer to BANDWIDTH_PING */
REGISTER_DATA = 90, /* Register data (screenshots typically) */
/* Non-data messages */ /* Non-data messages */
STOP = 55, /* End of this update sequence */ STOP = 55, /* End of this update sequence */
/* Data transfer of various kinds */ /* Data transfer of various kinds */