Changes in uspace/app/websrv/websrv.c [b7fd2a0:d5c1051] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/websrv/websrv.c
rb7fd2a0 rd5c1051 134 134 135 135 136 static errno_t recv_create(tcp_conn_t *conn, recv_t **rrecv)136 static int recv_create(tcp_conn_t *conn, recv_t **rrecv) 137 137 { 138 138 recv_t *recv; … … 157 157 158 158 /** Receive one character (with buffering) */ 159 static errno_t recv_char(recv_t *recv, char *c)159 static int recv_char(recv_t *recv, char *c) 160 160 { 161 161 size_t nrecv; 162 errno_t rc;162 int rc; 163 163 164 164 if (recv->rbuf_out == recv->rbuf_in) { … … 180 180 181 181 /** Receive one line with length limit */ 182 static errno_t recv_line(recv_t *recv, char **rbuf)182 static int recv_line(recv_t *recv, char **rbuf) 183 183 { 184 184 char *bp = recv->lbuf; … … 187 187 while (bp < recv->lbuf + BUFFER_SIZE) { 188 188 char prev = c; 189 errno_t rc = recv_char(recv, &c);189 int rc = recv_char(recv, &c); 190 190 191 191 if (rc != EOK) … … 226 226 } 227 227 228 static errno_t send_response(tcp_conn_t *conn, const char *msg)228 static int send_response(tcp_conn_t *conn, const char *msg) 229 229 { 230 230 size_t response_size = str_size(msg); … … 233 233 fprintf(stderr, "Sending response\n"); 234 234 235 errno_t rc = tcp_conn_send(conn, (void *) msg, response_size);235 int rc = tcp_conn_send(conn, (void *) msg, response_size); 236 236 if (rc != EOK) { 237 237 fprintf(stderr, "tcp_conn_send() failed\n"); … … 242 242 } 243 243 244 static errno_t uri_get(const char *uri, tcp_conn_t *conn)244 static int uri_get(const char *uri, tcp_conn_t *conn) 245 245 { 246 246 char *fbuf = NULL; 247 247 char *fname = NULL; 248 errno_t rc;248 int rc; 249 249 size_t nr; 250 250 int fd = -1; … … 302 302 } 303 303 304 static errno_t req_process(tcp_conn_t *conn, recv_t *recv)304 static int req_process(tcp_conn_t *conn, recv_t *recv) 305 305 { 306 306 char *reqline = NULL; 307 307 308 errno_t rc = recv_line(recv, &reqline);308 int rc = recv_line(recv, &reqline); 309 309 if (rc != EOK) { 310 310 fprintf(stderr, "recv_line() failed\n"); … … 355 355 } 356 356 357 static errno_t parse_option(int argc, char *argv[], int *index)357 static int parse_option(int argc, char *argv[], int *index) 358 358 { 359 359 int value; 360 errno_t rc;360 int rc; 361 361 362 362 switch (argv[*index][1]) { … … 403 403 static void websrv_new_conn(tcp_listener_t *lst, tcp_conn_t *conn) 404 404 { 405 errno_t rc;405 int rc; 406 406 recv_t *recv = NULL; 407 407 … … 443 443 tcp_listener_t *lst; 444 444 tcp_t *tcp; 445 errno_t rc;445 int rc; 446 446 447 447 /* Parse command line arguments */
Note:
See TracChangeset
for help on using the changeset viewer.