Permalink
Browse files

Rename TRANSACTION_SO to CONNECTION_SO and made it work for all outgo…

…ing connections
  • Loading branch information...
johandc committed Oct 15, 2015
1 parent 17bdaf0 commit cc1c944b36de1a18602c923833999fcce731e215
Showing with 7 additions and 4 deletions.
  1. +1 −1 bindings/python/pycspauto.py
  2. +3 −0 src/csp_conn.c
  3. +1 −1 src/csp_io.c
  4. +2 −2 wscript
@@ -3763,7 +3763,7 @@ def UINT16_C(c):
# ../../build/include/csp/csp_autoconfig.h: 26
try:
- CSP_TRANSACTION_SO = 0
+ CSP_CONNECTION_SO = 0
except:
pass
View
@@ -298,6 +298,9 @@ int csp_close(csp_conn_t * conn) {
csp_conn_t * csp_connect(uint8_t prio, uint8_t dest, uint8_t dport, uint32_t timeout, uint32_t opts) {
+ /* Force options on all connections */
+ opts |= CSP_CONNECTION_SO;
+
/* Generate identifier */
csp_id_t incoming_id, outgoing_id;
incoming_id.pri = prio;
View
@@ -388,7 +388,7 @@ int csp_transaction_persistent(csp_conn_t * conn, uint32_t timeout, void * outbu
int csp_transaction(uint8_t prio, uint8_t dest, uint8_t port, uint32_t timeout, void * outbuf, int outlen, void * inbuf, int inlen) {
- csp_conn_t * conn = csp_connect(prio, dest, port, 0, CSP_TRANSACTION_SO);
+ csp_conn_t * conn = csp_connect(prio, dest, port, 0, CSP_CONNECTION_SO);
if (conn == NULL)
return 0;
View
@@ -76,7 +76,7 @@ def options(ctx):
gr.add_option('--with-padding', metavar='BYTES', type=int, default=8, help='Set padding bytes before packet length field')
gr.add_option('--with-loglevel', metavar='LEVEL', default='debug', help='Set minimum compile time log level. Must be one of \'error\', \'warn\', \'info\' or \'debug\'')
gr.add_option('--with-rtable', metavar='TABLE', default='static', help='Set routing table type')
- gr.add_option('--with-transaction-so', metavar='CSP_SO', type=int, default='0x0000', help='Set outgoing csp_transaction socket options, see csp.h for valid values')
+ gr.add_option('--with-connection-so', metavar='CSP_SO', type=int, default='0x0000', help='Set outgoing connection socket options, see csp.h for valid values')
gr.add_option('--with-bufalign', metavar='BYTES', type=int, help='Set buffer alignment')
def configure(ctx):
@@ -219,7 +219,7 @@ def configure(ctx):
ctx.define('CSP_MAX_BIND_PORT', ctx.options.with_max_bind_port)
ctx.define('CSP_RDP_MAX_WINDOW', ctx.options.with_rdp_max_window)
ctx.define('CSP_PADDING_BYTES', ctx.options.with_padding)
- ctx.define('CSP_TRANSACTION_SO', ctx.options.with_transaction_so)
+ ctx.define('CSP_CONNECTION_SO', ctx.options.with_connection_so)
if ctx.options.with_bufalign != None:
ctx.define('CSP_BUFFER_ALIGN', ctx.options.with_bufalign)

0 comments on commit cc1c944

Please sign in to comment.