Changeset 447:e8e3b471e274 in qutecom-2.2 for wifo/phapi/phapi-old.c


Ignore:
Timestamp:
Dec 3, 2009 3:48:32 PM (3 years ago)
Author:
laurent@…
Branch:
default
Message:

Show error codes in a more fashion way

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wifo/phapi/phapi-old.c

    r425 r447  
    34983498        info.localUri = je->local_uri; 
    34993499        info.userData = je->external_reference; 
    3500         if (je->status_code == 486) 
    3501         { 
     3500        switch(je->status_code) { 
     3501 
     3502        case 486: 
    35023503                info.event = phCALLBUSY; 
    35033504                info.u.remoteUri = je->remote_uri; 
    3504  
    35053505                owplFireCallEvent(ca->cid, CALLSTATE_DISCONNECTED, CALLSTATE_DISCONNECTED_BUSY, ca->remote_uri, 0); 
    3506         } 
    3507         else 
    3508         { 
     3506                break; 
     3507 
     3508        case 404: 
     3509                info.event = phCALLERROR; 
     3510                info.u.remoteUri = je->remote_uri; 
     3511                owplFireCallEvent(ca->cid, CALLSTATE_DISCONNECTED, CALLSTATE_DISCONNECTED_USER_NOT_FOUND, ca->remote_uri, 0); 
     3512                break; 
     3513 
     3514        case 603: 
     3515                info.event = phCALLERROR; 
     3516                info.u.remoteUri = je->remote_uri; 
     3517                owplFireCallEvent(ca->cid, CALLSTATE_DISCONNECTED, CALLSTATE_DISCONNECTED_REJECTED, ca->remote_uri, 0); 
     3518                break; 
     3519 
     3520        case 480: 
     3521                info.event = phCALLERROR; 
     3522                info.u.remoteUri = je->remote_uri; 
     3523                owplFireCallEvent(ca->cid, CALLSTATE_DISCONNECTED, CALLSTATE_DISCONNECTED_USER_NOT_AVAILABLE, ca->remote_uri, 0); 
     3524                break; 
     3525                 
     3526        default: 
    35093527                info.event = phCALLERROR; 
    35103528                info.u.errorCode = je->status_code; 
    3511  
    35123529                owplFireCallEvent(ca->cid, CALLSTATE_DISCONNECTED, CALLSTATE_DISCONNECTED_UNKNOWN, ca->remote_uri, 0); 
    3513         } 
     3530                break; 
     3531 
     3532        } 
     3533 
    35143534 
    35153535        if (phcb->callProgress) { 
     
    43814401                owplFireSubscriptionEvent(je->sid, OWPL_SUBSCRIPTION_ACTIVE, SUBSCRIPTION_CAUSE_NORMAL, je->remote_uri, 0); 
    43824402        } 
    4383         else if (je->type == EXOSIP_SUBSCRIPTION_REQUESTFAILURE) 
    4384         { 
    4385                 if (je->status_code == 481) { 
     4403        else if (je->type == EXOSIP_SUBSCRIPTION_REQUESTFAILURE || je->type == EXOSIP_SUBSCRIPTION_SERVERFAILURE) 
     4404        { 
     4405            if (je->status_code < 200 || je->status_code > 299) { 
    43864406                    char proxyBuf[256]; 
    43874407                    int n = sizeof(proxyBuf); 
     
    45334553 
    45344554                case EXOSIP_SUBSCRIPTION_REQUESTFAILURE: 
     4555                case EXOSIP_SUBSCRIPTION_SERVERFAILURE: 
    45354556                case EXOSIP_SUBSCRIPTION_ANSWERED: 
    45364557                        ph_subscription_progress(je); 
     
    47654786 
    47664787                                case EXOSIP_SUBSCRIPTION_REQUESTFAILURE: 
     4788                                case EXOSIP_SUBSCRIPTION_SERVERFAILURE: 
    47674789                                case EXOSIP_SUBSCRIPTION_ANSWERED: 
    47684790                                        ph_subscription_progress(je); 
Note: See TracChangeset for help on using the changeset viewer.