comparison common-session.c @ 1121:bb3a03feb31f

Merge pull request #13 from gazoo74/fix-warnings Fix warnings
author Matt Johnston <matt@ucc.asn.au>
date Thu, 04 Jun 2015 22:25:28 +0800
parents 8e0280986710 c45d65392c1a
children d7b752525b91
comparison
equal deleted inserted replaced
1087:1e486f368ec3 1121:bb3a03feb31f
325 TRACE(("leave session_cleanup")) 325 TRACE(("leave session_cleanup"))
326 } 326 }
327 327
328 void send_session_identification() { 328 void send_session_identification() {
329 buffer *writebuf = buf_new(strlen(LOCAL_IDENT "\r\n") + 1); 329 buffer *writebuf = buf_new(strlen(LOCAL_IDENT "\r\n") + 1);
330 buf_putbytes(writebuf, LOCAL_IDENT "\r\n", strlen(LOCAL_IDENT "\r\n")); 330 buf_putbytes(writebuf, (const unsigned char *) LOCAL_IDENT "\r\n", strlen(LOCAL_IDENT "\r\n"));
331 writebuf_enqueue(writebuf, 0); 331 writebuf_enqueue(writebuf, 0);
332 } 332 }
333 333
334 static void read_session_identification() { 334 static void read_session_identification() {
335 /* max length of 255 chars */ 335 /* max length of 255 chars */
465 } else { 465 } else {
466 TRACE(("keepalive global request")) 466 TRACE(("keepalive global request"))
467 /* Some peers will reply with SSH_MSG_REQUEST_FAILURE, 467 /* Some peers will reply with SSH_MSG_REQUEST_FAILURE,
468 some will reply with SSH_MSG_UNIMPLEMENTED, some will exit. */ 468 some will reply with SSH_MSG_UNIMPLEMENTED, some will exit. */
469 buf_putbyte(ses.writepayload, SSH_MSG_GLOBAL_REQUEST); 469 buf_putbyte(ses.writepayload, SSH_MSG_GLOBAL_REQUEST);
470 buf_putstring(ses.writepayload, DROPBEAR_KEEPALIVE_STRING, 470 buf_putstring(ses.writepayload, (const unsigned char *) DROPBEAR_KEEPALIVE_STRING,
471 strlen(DROPBEAR_KEEPALIVE_STRING)); 471 strlen(DROPBEAR_KEEPALIVE_STRING));
472 } 472 }
473 buf_putbyte(ses.writepayload, 1); /* want_reply */ 473 buf_putbyte(ses.writepayload, 1); /* want_reply */
474 encrypt_packet(); 474 encrypt_packet();
475 475