comparison svr-chansession.c @ 1113:367d3800555b

Turn signame local variable into char *
author Gaël PORTAY <gael.portay@gmail.com>
date Sat, 02 May 2015 23:32:13 +0200
parents 5eb00b6b9040
children aaf576b27a10
comparison
equal deleted inserted replaced
1112:5eb00b6b9040 1113:367d3800555b
219 219
220 buf_putbyte(ses.writepayload, SSH_MSG_CHANNEL_REQUEST); 220 buf_putbyte(ses.writepayload, SSH_MSG_CHANNEL_REQUEST);
221 buf_putint(ses.writepayload, channel->remotechan); 221 buf_putint(ses.writepayload, channel->remotechan);
222 buf_putstring(ses.writepayload, (const unsigned char *) "exit-signal", 11); 222 buf_putstring(ses.writepayload, (const unsigned char *) "exit-signal", 11);
223 buf_putbyte(ses.writepayload, 0); /* boolean FALSE */ 223 buf_putbyte(ses.writepayload, 0); /* boolean FALSE */
224 buf_putstring(ses.writepayload, signame, strlen(signame)); 224 buf_putstring(ses.writepayload, (const unsigned char *) signame, strlen(signame));
225 buf_putbyte(ses.writepayload, chansess->exit.exitcore); 225 buf_putbyte(ses.writepayload, chansess->exit.exitcore);
226 buf_putstring(ses.writepayload, (const unsigned char *) "", 0); /* error msg */ 226 buf_putstring(ses.writepayload, (const unsigned char *) "", 0); /* error msg */
227 buf_putstring(ses.writepayload, (const unsigned char *) "", 0); /* lang */ 227 buf_putstring(ses.writepayload, (const unsigned char *) "", 0); /* lang */
228 228
229 encrypt_packet(); 229 encrypt_packet();
404 404
405 /* Send a signal to a session's process as requested by the client*/ 405 /* Send a signal to a session's process as requested by the client*/
406 static int sessionsignal(struct ChanSess *chansess) { 406 static int sessionsignal(struct ChanSess *chansess) {
407 407
408 int sig = 0; 408 int sig = 0;
409 unsigned char* signame = NULL; 409 char* signame = NULL;
410 int i; 410 int i;
411 411
412 if (chansess->pid == 0) { 412 if (chansess->pid == 0) {
413 /* haven't got a process pid yet */ 413 /* haven't got a process pid yet */
414 return DROPBEAR_FAILURE; 414 return DROPBEAR_FAILURE;
415 } 415 }
416 416
417 signame = buf_getstring(ses.payload, NULL); 417 signame = (char *) buf_getstring(ses.payload, NULL);
418 418
419 i = 0; 419 i = 0;
420 while (signames[i].name != 0) { 420 while (signames[i].name != 0) {
421 if (strcmp(signames[i].name, signame) == 0) { 421 if (strcmp(signames[i].name, signame) == 0) {
422 sig = signames[i].signal; 422 sig = signames[i].signal;