]> git.lizzy.rs Git - plan9front.git/commitdiff
ip: implement "hangup" ctl for udp protocol
authorcinap_lenrek <cinap_lenrek@felloff.net>
Thu, 13 Nov 2014 15:47:19 +0000 (16:47 +0100)
committercinap_lenrek <cinap_lenrek@felloff.net>
Thu, 13 Nov 2014 15:47:19 +0000 (16:47 +0100)
sys/src/9/ip/udp.c

index 0f79b413fde3741b1d0f6fcf6e1ced63fd737403..910892b4bc794249148bb4782ba311d07cf494d6 100644 (file)
@@ -518,6 +518,11 @@ udpctl(Conv *c, char **f, int n)
 
        ucb = (Udpcb*)c->ptcl;
        if(n == 1){
+               if(strcmp(f[0], "hangup") == 0){
+                       qhangup(c->rq, nil);
+                       qhangup(c->wq, nil);
+                       return nil;
+               }
                if(strcmp(f[0], "headers") == 0){
                        ucb->headers = 7;       /* new headers format */
                        return nil;