patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9575, Generic HTTP server port

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9575: Generic HTTP server port

Submitter:  Giuseppe Modugno <giusloq>
Submitted:  Tue 27 Feb 2018 09:11:04 AM UTC
   
 
Category:  apps Priority:  5 - Normal
Status:  Wont Do Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Wed 25 Apr 2018 06:41:52 PM UTC, comment #5: 

OK

Simon Goldschmidt <goldsimon>
Group administrator
Tue 13 Mar 2018 10:52:57 AM UTC, comment #4: 

Please, forget my patch. It's useless.

You can always define HTTPD_SERVER_PORT macro as a function that returns a "dynamic" number:

#define HTTPD_SERVER_PORT   my_httpd_port()

In this way the port can be changed at run-time, without touching original lwip code.

Giuseppe Modugno <giusloq>
Tue 27 Feb 2018 09:41:22 AM UTC, comment #3: 

Oh yes, Simon. I think you can combine by yourself, considering the patch is trivial.

Giuseppe Modugno <giusloq>
Tue 27 Feb 2018 09:28:34 AM UTC, comment #2: 

The patch looks OK. I'd combine this with httpd_inits and the new altcp allocators though.

Simon Goldschmidt <goldsimon>
Group administrator
Tue 27 Feb 2018 09:14:29 AM UTC, comment #1: 

Ah, of course I'm considering the scenario where the port must be changed at runtime.

Giuseppe Modugno <giusloq>
Tue 27 Feb 2018 09:11:04 AM UTC, original submission:  

I think it's very common to change the port where the HTTP server listens. I suggest this patch that changes http_init() function.

Maybe another improvement could be to check port parameter in http_init(): if it's zero, use the default HTTPD_SERVER_PORT, otherwise use the parameter value as the server port.

Giuseppe Modugno <giusloq>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #43406:  patch.diff added by giusloq (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by giusloq (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-25 goldsimon StatusNone Wont Do
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2018-02-27 giusloq Attached File- Added patch.diff, #43406

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code