Rename protocol structs
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user