Unified · Split
| @@ -25,10 +25,6 @@ enum { · 24 unmodified lines | ||
| 25 | 25 | Joined = 1<<2, |
| 26 | 26 | }; |
| 27 | 27 | |
| 28 | −#define max(a,b) ((a)>(b)?(a):(b)) | |
| 29 | −#define used(x) ((void)(x)) | |
| 30 | −#define nelem(x) (int)(sizeof(x)/sizeof((x)[0])) | |
| 31 | − | |
| 32 | 28 | typedef struct C9aux C9aux; |
| 33 | 29 | typedef struct REntry REntry; |
| 34 | 30 | |
| @@ -243,7 +239,6 @@ ctxregistryR(C9ctx *ctx, C9r *r) · 208 unmodified lines | ||
| 243 | 239 | *s = 0; |
| 244 | 240 | if (strstr(b, "tlssrv") == NULL && (s = strchr(b, ' ')) != NULL) { |
| 245 | 241 | *s = 0; |
| 246 | − printf("chat is at %s\n", b); | |
| 247 | 242 | close(a->f); |
| 248 | 243 | if ((a->f = dial(b)) < 0) |
| 249 | 244 | exit(1); |
| @@ -251,11 +246,14 @@ ctxregistryR(C9ctx *ctx, C9r *r) · 1 unmodified line | ||
| 251 | 246 | a->r = ctxchatR; |
| 252 | 247 | a->wroff = a->wrend = 0; |
| 253 | 248 | c9version(ctx, &tag, Msize); |
| 254 | − wrsend(a); | |
| 255 | − break; | |
| 249 | + if (wrsend(a) != 0) | |
| 250 | + exit(1); | |
| 251 | + return; | |
| 256 | 252 | } |
| 257 | 253 | |
| 258 | 254 | } |
| 255 | + fprintf(stderr, "chat hasn't been found in the registry\n"); | |
| 256 | + exit(1); | |
| 259 | 257 | break; |
| 260 | 258 | |
| 261 | 259 | case Rerror: |