welcomed = 1;
printf("BIRD %s ready.\n", name);
}
+ symread = 1;
return;
case RC_NOTIFY:
case RC_TABLE_NAME: flag = CLI_SF_TABLE; break;
case RC_TEMPLATE_NAME: flag = CLI_SF_TEMPLATE; break;
case RC_INTERFACE_NAME: flag = CLI_SF_INTERFACE; break;
+ case RC_DUMP_DONE: symread = 0; return;
default:
printf("Undefined %d: %s", reply_code, name);
return;
}
- if (flag && name && *name) {
- symread = 1;
- add_to_symbols(flag, name);
- }
+ if (flag && name && *name)
+ if (symread)
+ add_to_symbols(flag, name);
+ else
+ printf("Unexpected symbol definition %d: %s", reply_code, name);
}
#define PRINTF(LEN, PARGS...) do { if (!skip_input && !complete) len = printf(PARGS); } while(0)
else if (code)
{
PRINTF(len, "%s\n", verbose ? x : x+5);
- } else if (symread)
- symread = 0;
+ }
if (x[4] == ' ')
{
RC_SHOW_RIP_INTERFACE = 1021,
RC_SHOW_RIP_NEIGHBORS = 1022,
- RC_BIRD_VERSION_NUM = 3000,
+ RC_BIRD_VERSION_NUM = 3000, /* This begins the symbol dump */
RC_TABLE_NAME = 3001,
RC_PROTOCOL_NAME = 3002,
RC_FILTER_NAME = 3003,
RC_VARIABLE_NAME = 3006,
RC_TEMPLATE_NAME = 3007,
RC_INTERFACE_NAME = 3008,
- RC_NOTIFY = 3009, /* Daemon notifies the client about new symbol set */
+ RC_DUMP_DONE = 3009, /* This ends the symbol dump */
+ RC_NOTIFY = 3010, /* Daemon notifies the client about new symbol set */
RC_REPLY_TOO_LONG = 8000,
RC_ROUTE_NOT_FOUND = 8001,
if (!(i->flags & IF_SHUTDOWN))
cli_msg(RC_INTERFACE_NAME, "\"%s\"", i->name);
- cli_msg(0, "");
+ cli_msg(RC_DUMP_DONE, "");
}
static void