Mercurial > urweb
comparison src/c/static.c @ 1498:8c32c7191bf0
Make 'static' protocol handle unlimited retry
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 15 Jul 2011 18:55:58 -0400 |
parents | 9cb923efea4d |
children | 2f9b7382dd1d |
comparison
equal
deleted
inserted
replaced
1497:0b639858200b | 1498:8c32c7191bf0 |
---|---|
23 return 1; | 23 return 1; |
24 } | 24 } |
25 | 25 |
26 ctx = uw_init(0, NULL, log_debug); | 26 ctx = uw_init(0, NULL, log_debug); |
27 uw_set_app(ctx, &uw_application); | 27 uw_set_app(ctx, &uw_application); |
28 fk = uw_begin(ctx, argv[1]); | |
29 | 28 |
30 if (fk == SUCCESS) { | 29 while (1) { |
31 uw_print(ctx, 1); | 30 fk = uw_begin(ctx, argv[1]); |
32 puts(""); | 31 |
33 return 0; | 32 if (fk == SUCCESS) { |
34 } else { | 33 uw_print(ctx, 1); |
35 fprintf(stderr, "Error!\n"); | 34 puts(""); |
36 return 1; | 35 return 0; |
36 } else if (fk != UNLIMITED_RETRY) { | |
37 fprintf(stderr, "Error: %s\n", uw_error_message(ctx)); | |
38 return 1; | |
39 } | |
37 } | 40 } |
38 } | 41 } |
39 | 42 |
40 void *uw_init_client_data() { | 43 void *uw_init_client_data() { |
41 return NULL; | 44 return NULL; |