comparison svr-x11fwd.c @ 1123:d7b752525b91

buf_getstring and buf_putstring now use non-unsigned char*
author Matt Johnston <matt@ucc.asn.au>
date Thu, 04 Jun 2015 23:08:50 +0800
parents 877256d1b3fb
children a3e8389e01ff 888e3d17e962
comparison
equal deleted inserted replaced
1121:bb3a03feb31f 1123:d7b752525b91
56 if (chansess->x11listener != NULL) { 56 if (chansess->x11listener != NULL) {
57 return DROPBEAR_FAILURE; 57 return DROPBEAR_FAILURE;
58 } 58 }
59 59
60 chansess->x11singleconn = buf_getbool(ses.payload); 60 chansess->x11singleconn = buf_getbool(ses.payload);
61 chansess->x11authprot = (char *)buf_getstring(ses.payload, NULL); 61 chansess->x11authprot = buf_getstring(ses.payload, NULL);
62 chansess->x11authcookie = (char *)buf_getstring(ses.payload, NULL); 62 chansess->x11authcookie = buf_getstring(ses.payload, NULL);
63 chansess->x11screennum = buf_getint(ses.payload); 63 chansess->x11screennum = buf_getint(ses.payload);
64 64
65 /* create listening socket */ 65 /* create listening socket */
66 fd = socket(PF_INET, SOCK_STREAM, 0); 66 fd = socket(PF_INET, SOCK_STREAM, 0);
67 if (fd < 0) { 67 if (fd < 0) {
201 201
202 char* ipstring = NULL; 202 char* ipstring = NULL;
203 203
204 if (send_msg_channel_open_init(fd, &chan_x11) == DROPBEAR_SUCCESS) { 204 if (send_msg_channel_open_init(fd, &chan_x11) == DROPBEAR_SUCCESS) {
205 ipstring = inet_ntoa(addr->sin_addr); 205 ipstring = inet_ntoa(addr->sin_addr);
206 buf_putstring(ses.writepayload, (const unsigned char *)ipstring, strlen(ipstring)); 206 buf_putstring(ses.writepayload, ipstring, strlen(ipstring));
207 buf_putint(ses.writepayload, addr->sin_port); 207 buf_putint(ses.writepayload, addr->sin_port);
208 208
209 encrypt_packet(); 209 encrypt_packet();
210 return DROPBEAR_SUCCESS; 210 return DROPBEAR_SUCCESS;
211 } else { 211 } else {