Show More
@@ -311,9 +311,16 b' static void readhello(hgclient_t *hgc)' | |||
|
311 | 311 | { |
|
312 | 312 | readchannel(hgc); |
|
313 | 313 | context_t *ctx = &hgc->ctx; |
|
314 | if (ctx->ch != 'o') | |
|
315 | abortmsg("unexpected channel of hello message (ch = %c)", | |
|
316 | ctx->ch); | |
|
314 | if (ctx->ch != 'o') { | |
|
315 | char ch = ctx->ch; | |
|
316 | if (ch == 'e') { | |
|
317 | /* write early error and will exit */ | |
|
318 | fwrite(ctx->data, sizeof(ctx->data[0]), ctx->datasize, | |
|
319 | stderr); | |
|
320 | handleresponse(hgc); | |
|
321 | } | |
|
322 | abortmsg("unexpected channel of hello message (ch = %c)", ch); | |
|
323 | } | |
|
317 | 324 | enlargecontext(ctx, ctx->datasize + 1); |
|
318 | 325 | ctx->data[ctx->datasize] = '\0'; |
|
319 | 326 | debugmsg("hello received: %s (size = %zu)", ctx->data, ctx->datasize); |
General Comments 0
You need to be logged in to leave comments.
Login now