Changeset 0413b14 in rtems


Ignore:
Timestamp:
Sep 26, 2018, 7:06:43 AM (13 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
8e075540
Parents:
b980f363
git-author:
Sebastian Huber <sebastian.huber@…> (09/26/18 07:06:43)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/01/18 10:28:10)
Message:

telnetd: Remove superfluous global variable

Update #3528.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/telnetd/telnetd.c

    rb980f363 r0413b14  
    8989/***********************************************************/
    9090static rtems_telnetd_config_table *telnetd_config;
    91 static rtems_id                    telnetd_task_id;
    9291
    9392/*
     
    195194  int                size_adr;
    196195  struct shell_args *arg = NULL;
     196  rtems_id           task_id;
    197197
    198198  if ((des_socket=socket(PF_INET,SOCK_STREAM,0))<0) {
    199199    perror("telnetd:socket");
    200     telnetd_task_id = RTEMS_ID_NONE;
    201200    rtems_task_delete(RTEMS_SELF);
    202201  };
     
    210209    perror("telnetd:bind");
    211210    close(des_socket);
    212     telnetd_task_id = RTEMS_ID_NONE;
    213211    rtems_task_delete(RTEMS_SELF);
    214212  };
     
    216214    perror("telnetd:listen");
    217215          close(des_socket);
    218     telnetd_task_id = RTEMS_ID_NONE;
    219216    rtems_task_delete(RTEMS_SELF);
    220217  };
     
    258255      strncpy(arg->peername, peername, sizeof(arg->peername));
    259256
    260       telnetd_task_id = telnetd_spawn_task(
     257      task_id = telnetd_spawn_task(
    261258        arg->pty.name,
    262259        telnetd_config->priority,
     
    265262        arg
    266263      );
    267       if (telnetd_task_id == RTEMS_ID_NONE) {
     264      if (task_id == RTEMS_ID_NONE) {
    268265        FILE *dummy;
    269266
     
    295292   */
    296293  close(des_socket);
    297   telnetd_task_id = RTEMS_ID_NONE;
    298294}
    299295
    300296rtems_status_code rtems_telnetd_start(const rtems_telnetd_config_table* config)
    301297{
     298  rtems_id task_id;
     299
    302300  if (telnetd_config != NULL) {
    303301    fprintf(stderr, "telnetd already started\n");
     
    334332
    335333  /* Spawn task */
    336   telnetd_task_id = telnetd_spawn_task(
     334  task_id = telnetd_spawn_task(
    337335    "TNTD",
    338336    telnetd_config->priority,
     
    341339    0
    342340  );
    343   if (telnetd_task_id == RTEMS_ID_NONE) {
     341  if (task_id == RTEMS_ID_NONE) {
    344342    free(telnetd_config);
    345343    telnetd_config = NULL;
Note: See TracChangeset for help on using the changeset viewer.