Mercurial > dropbear
comparison cli-runopts.c @ 415:8b9aba1d5fa4 channel-fix
merge of '73fe066c5d9e2395354ba74756124d45c978a04d'
and 'f5014cc84558f1e8eba42dbecf9f72f94bfe6134'
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 06 Feb 2007 16:00:18 +0000 |
parents | 47bcc3536bd5 |
children | ab57ba0cb667 |
comparison
equal
deleted
inserted
replaced
414:c53a26c430e5 | 415:8b9aba1d5fa4 |
---|---|
361 struct TCPFwdList* newfwd = NULL; | 361 struct TCPFwdList* newfwd = NULL; |
362 char * str = NULL; | 362 char * str = NULL; |
363 | 363 |
364 TRACE(("enter addforward")) | 364 TRACE(("enter addforward")) |
365 | 365 |
366 /* We probably don't want to be editing argvs */ | 366 /* We need to split the original argument up. This var |
367 is never free()d. */ | |
367 str = m_strdup(origstr); | 368 str = m_strdup(origstr); |
368 | 369 |
369 listenport = str; | 370 listenport = str; |
370 | 371 |
371 connectaddr = strchr(str, ':'); | 372 connectaddr = strchr(str, ':'); |
372 if (connectaddr == NULL) { | 373 if (connectaddr == NULL) { |
373 TRACE(("connectaddr == NULL")) | 374 TRACE(("connectaddr == NULL")) |
374 goto fail; | 375 goto fail; |
375 } | 376 } |
376 | 377 *connectaddr = '\0'; |
377 connectaddr[0] = '\0'; | |
378 connectaddr++; | 378 connectaddr++; |
379 | 379 |
380 connectport = strchr(connectaddr, ':'); | 380 connectport = strchr(connectaddr, ':'); |
381 if (connectport == NULL) { | 381 if (connectport == NULL) { |
382 TRACE(("connectport == NULL")) | 382 TRACE(("connectport == NULL")) |
383 goto fail; | 383 goto fail; |
384 } | 384 } |
385 | 385 *connectport = '\0'; |
386 connectport[0] = '\0'; | |
387 connectport++; | 386 connectport++; |
388 | 387 |
389 newfwd = (struct TCPFwdList*)m_malloc(sizeof(struct TCPFwdList)); | 388 newfwd = (struct TCPFwdList*)m_malloc(sizeof(struct TCPFwdList)); |
390 | 389 |
391 /* Now we check the ports - note that the port ints are unsigned, | 390 /* Now we check the ports - note that the port ints are unsigned, |