Changeset 4f64a523 in mainline for uspace/srv/ethip/ethip_nic.c


Ignore:
Timestamp:
2012-02-12T19:36:32Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
df15e5f
Parents:
1493811
Message:

Need to limit iplink to a single client connection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/ethip/ethip_nic.c

    r1493811 r4f64a523  
    158158        }
    159159
    160         rc = nic_set_state(nic->sess, NIC_STATE_ACTIVE);
    161         if (rc != EOK) {
    162                 log_msg(LVL_ERROR, "Failed activating NIC '%s'.",
    163                     nic->svc_name);
    164                 goto error;
    165         }
    166 
    167160        log_msg(LVL_DEBUG, "Opened NIC '%s'", nic->svc_name);
    168161        list_append(&nic->nic_list, &ethip_nic_list);
     
    172165        if (rc != EOK)
    173166                goto error;
     167
     168        rc = nic_set_state(nic->sess, NIC_STATE_ACTIVE);
     169        if (rc != EOK) {
     170                log_msg(LVL_ERROR, "Failed activating NIC '%s'.",
     171                    nic->svc_name);
     172                goto error;
     173        }
    174174
    175175        log_msg(LVL_DEBUG, "Initialized IP link service.");
     
    205205        size_t size;
    206206
    207         log_msg(LVL_DEBUG, "ethip_nic_received()");
     207        log_msg(LVL_DEBUG, "ethip_nic_received() nic=%p", nic);
    208208
    209209        rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
     
    213213        }
    214214
     215        log_msg(LVL_DEBUG, "call ethip_received");
    215216        rc = ethip_received(&nic->iplink, data, size);
     217        log_msg(LVL_DEBUG, "free data");
    216218        free(data);
    217219
     
    228230static void ethip_nic_cb_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg)
    229231{
    230         ethip_nic_t *nic;
     232        ethip_nic_t *nic = (ethip_nic_t *)arg;
    231233
    232234        log_msg(LVL_DEBUG, "ethnip_nic_cb_conn()");
Note: See TracChangeset for help on using the changeset viewer.