Rename protocol structs

This commit is contained in:
2016-08-12 12:18:10 +03:00
parent dcd7a46d0a
commit 3309026308
5 changed files with 25 additions and 25 deletions

View File

@@ -40,7 +40,7 @@ static void show_certs(SSL *ssl)
static void* servlet(void *args) /* Serve the connection -- threadable */
{
struct msg buf;
struct msg_t buf;
int bytes, ret;
//unsigned short job[MAXJOBS] = { 0 };
struct agent_args *agent = (struct agent_args*)args;
@@ -59,7 +59,7 @@ static void* servlet(void *args) /* Serve the connection -- threadable */
SSL_write(agent->ssl, &buf, sizeof(buf));
bytes = SSL_read(agent->ssl, &buf, sizeof(buf));
if (bytes > 0) {
if (bytes != sizeof(struct msg)) {
if (bytes != sizeof(struct msg_t)) {
log( WARNING,
"Agent [%s] sent non-standard data!",
agent->ip );
@@ -77,7 +77,7 @@ static void* servlet(void *args) /* Serve the connection -- threadable */
log(VERBOSE, "Client didn't send data! SSL error below:");
//log_ssl(); /* We actually don't have anything to log from SSL */
sprintf((char*)buf.chunk.data, "%s", "Where's the data, m8?");
SSL_write(agent->ssl, &buf, sizeof(struct msg));
SSL_write(agent->ssl, &buf, sizeof(struct msg_t));
}
log(INFO, "Agent [%s] disconnected.", agent->ip);
} while (bytes);