Bugzilla – Attachment 1706 Details for
Bug 1664
add support for tagging session channels with friendly names and add "ps" control command
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
adds the base channel tagging code
openssh-channel-tags-0.patch (text/plain), 1.27 KB, created by
Salvador Fandiño
on 2009-10-25 22:04:35 AEDT
(
hide
)
Description:
adds the base channel tagging code
Filename:
MIME Type:
Creator:
Salvador Fandiño
Created:
2009-10-25 22:04:35 AEDT
Size:
1.27 KB
patch
obsolete
>diff --git a/channels.c b/channels.c >index 56047f3..16031ed 100644 >--- a/channels.c >+++ b/channels.c >@@ -317,6 +317,7 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd, > c->output_filter = NULL; > c->filter_ctx = NULL; > c->filter_cleanup = NULL; >+ c->tag = NULL; > TAILQ_INIT(&c->status_confirms); > debug("channel %d: new [%s]", found, remote_name); > return c; >@@ -402,6 +403,10 @@ channel_free(Channel *c) > xfree(c->path); > c->path = NULL; > } >+ if (c->tag) { >+ xfree(c->tag); >+ c->tag = NULL; >+ } > while ((cc = TAILQ_FIRST(&c->status_confirms)) != NULL) { > if (cc->abandon_cb != NULL) > cc->abandon_cb(c, cc->ctx); >diff --git a/channels.h b/channels.h >index 3800b2d..8739cef 100644 >--- a/channels.h >+++ b/channels.h >@@ -137,6 +137,9 @@ struct Channel { > > /* non-blocking connect */ > struct channel_connect connect_ctx; >+ >+ /* friendly name */ >+ char *tag; > }; > > #define CHAN_EXTENDED_IGNORE 0 >diff --git a/ssh.c b/ssh.c >index ee34e6e..d5e1cb8 100644 >--- a/ssh.c >+++ b/ssh.c >@@ -1157,6 +1157,7 @@ ssh_session2_open(void) > "session", SSH_CHANNEL_OPENING, in, out, err, > window, packetmax, CHAN_EXTENDED_WRITE, > "client-session", /*nonblock*/0); >+ xasprintf(&c->tag, "%ld", (long)getpid()); > > debug3("ssh_session2_open: channel_new: %d", c->self); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1664
: 1706 |
1707
|
1708