This is an automated email from Gerrit.

Spencer Oliver ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/788

-- gerrit

commit c631198d45414b32bf196354b1a20dfb6d6487ea
Author: Spencer Oliver <[email protected]>
Date:   Tue Aug 21 11:10:18 2012 +0100

    server: warn if user changes server port after init
    
    So the user can view the current port number these cmds were changed to 
COMMAND_ANY.
    However this means that the user can also attempt to change the port number 
after init,
    even though this is not supported. Issue a warning that this is not 
supported.
    
    Change-Id: I3d20dcd81277e7d994240a8e314f27672ff760c4
    Signed-off-by: Spencer Oliver <[email protected]>

diff --git a/src/server/server.c b/src/server/server.c
index 16f7510..96f06b3 100644
--- a/src/server/server.c
+++ b/src/server/server.c
@@ -635,6 +635,10 @@ SERVER_PIPE_COMMAND()
                        break;
                case 1:
                {
+                       if (CMD_CTX->mode == COMMAND_EXEC) {
+                               LOG_WARNING("unable to change server port after 
init");
+                               return ERROR_COMMAND_ARGUMENT_INVALID;
+                       }
                        const char *t = strdup(CMD_ARGV[0]);
                        free((void *)*out);
                        *out = t;

-- 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to