Changeset a1e2df13 in mainline for uspace/srv/net/inetsrv/inet_link.c


Ignore:
Timestamp:
2012-11-11T21:31:03Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
25eec4e
Parents:
141a20d (diff), d1538a1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/inetsrv/inet_link.c

    r141a20d ra1e2df13  
    6464        int rc;
    6565
    66         log_msg(LVL_DEBUG, "inet_iplink_recv()");
     66        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_iplink_recv()");
    6767        rc = inet_pdu_decode(sdu->data, sdu->size, &packet);
    6868        if (rc != EOK) {
    69                 log_msg(LVL_DEBUG, "failed decoding PDU");
     69                log_msg(LOG_DEFAULT, LVL_DEBUG, "failed decoding PDU");
    7070                return rc;
    7171        }
    7272
    73         log_msg(LVL_DEBUG, "call inet_recv_packet()");
     73        log_msg(LOG_DEFAULT, LVL_DEBUG, "call inet_recv_packet()");
    7474        rc = inet_recv_packet(&packet);
    75         log_msg(LVL_DEBUG, "call inet_recv_packet -> %d", rc);
     75        log_msg(LOG_DEFAULT, LVL_DEBUG, "call inet_recv_packet -> %d", rc);
    7676        free(packet.data);
    7777
     
    9191        rc = loc_category_get_id("iplink", &iplink_cat, IPC_FLAG_BLOCKING);
    9292        if (rc != EOK) {
    93                 log_msg(LVL_ERROR, "Failed resolving category 'iplink'.");
     93                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed resolving category 'iplink'.");
    9494                fibril_mutex_unlock(&inet_discovery_lock);
    9595                return ENOENT;
     
    9898        rc = loc_category_get_svcs(iplink_cat, &svcs, &count);
    9999        if (rc != EOK) {
    100                 log_msg(LVL_ERROR, "Failed getting list of IP links.");
     100                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed getting list of IP links.");
    101101                fibril_mutex_unlock(&inet_discovery_lock);
    102102                return EIO;
     
    116116
    117117                if (!already_known) {
    118                         log_msg(LVL_DEBUG, "Found IP link '%lu'",
     118                        log_msg(LOG_DEFAULT, LVL_DEBUG, "Found IP link '%lu'",
    119119                            (unsigned long) svcs[i]);
    120120                        rc = inet_link_open(svcs[i]);
    121121                        if (rc != EOK)
    122                                 log_msg(LVL_ERROR, "Could not open IP link.");
     122                                log_msg(LOG_DEFAULT, LVL_ERROR, "Could not open IP link.");
    123123                }
    124124        }
     
    133133
    134134        if (ilink == NULL) {
    135                 log_msg(LVL_ERROR, "Failed allocating link structure. "
     135                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed allocating link structure. "
    136136                    "Out of memory.");
    137137                return NULL;
     
    156156        int rc;
    157157
    158         log_msg(LVL_DEBUG, "inet_link_open()");
     158        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_link_open()");
    159159        ilink = inet_link_new();
    160160        if (ilink == NULL)
     
    166166        rc = loc_service_get_name(sid, &ilink->svc_name);
    167167        if (rc != EOK) {
    168                 log_msg(LVL_ERROR, "Failed getting service name.");
     168                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed getting service name.");
    169169                goto error;
    170170        }
     
    172172        ilink->sess = loc_service_connect(EXCHANGE_SERIALIZE, sid, 0);
    173173        if (ilink->sess == NULL) {
    174                 log_msg(LVL_ERROR, "Failed connecting '%s'", ilink->svc_name);
     174                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed connecting '%s'", ilink->svc_name);
    175175                goto error;
    176176        }
     
    178178        rc = iplink_open(ilink->sess, &inet_iplink_ev_ops, &ilink->iplink);
    179179        if (rc != EOK) {
    180                 log_msg(LVL_ERROR, "Failed opening IP link '%s'",
     180                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed opening IP link '%s'",
    181181                    ilink->svc_name);
    182182                goto error;
     
    185185        rc = iplink_get_mtu(ilink->iplink, &ilink->def_mtu);
    186186        if (rc != EOK) {
    187                 log_msg(LVL_ERROR, "Failed determinning MTU of link '%s'",
     187                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed determinning MTU of link '%s'",
    188188                    ilink->svc_name);
    189189                goto error;
    190190        }
    191191
    192         log_msg(LVL_DEBUG, "Opened IP link '%s'", ilink->svc_name);
     192        log_msg(LOG_DEFAULT, LVL_DEBUG, "Opened IP link '%s'", ilink->svc_name);
    193193        list_append(&ilink->link_list, &inet_link_list);
    194194
     
    209209        rc = inet_addrobj_add(addr);
    210210        if (rc != EOK) {
    211                 log_msg(LVL_ERROR, "Failed setting IP address on internet link.");
     211                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed setting IP address on internet link.");
    212212                inet_addrobj_delete(addr);
    213213                /* XXX Roll back */
     
    218218        rc = iplink_addr_add(ilink->iplink, &iaddr);
    219219        if (rc != EOK) {
    220                 log_msg(LVL_ERROR, "Failed setting IP address on internet link.");
     220                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed setting IP address on internet link.");
    221221                inet_addrobj_remove(addr);
    222222                inet_addrobj_delete(addr);
     
    245245        rc = loc_register_cat_change_cb(inet_link_cat_change_cb);
    246246        if (rc != EOK) {
    247                 log_msg(LVL_ERROR, "Failed registering callback for IP link "
     247                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering callback for IP link "
    248248                    "discovery (%d).", rc);
    249249                return rc;
Note: See TracChangeset for help on using the changeset viewer.