Changeset 501

Show
Ignore:
Timestamp:
07/18/08 10:13:33 (4 months ago)
Author:
bellmich
Message:

fixed the obex server again after understanding what's going on

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libsyncml/transports/obex_server.c

    r499 r501  
    651651        smlAssert(data || error); 
    652652        smlAssert(userdata); 
    653         SmlLinkObexServerEnv *linkenv = userdata; 
     653        SmlTransportObexServerEnv *env = userdata; 
     654        SmlLinkObexServerEnv *linkenv = link; 
    654655        SmlError *local_error = NULL; 
    655656 
    656         if (link != NULL) { 
    657                 linkenv = link; 
    658         } else { 
    659                 /* send is called before connect succeeded */ 
     657        if (link == NULL) { 
     658                /* send is called before connect succeeded or 
     659                * the user of the library ignored the link 
     660                */ 
    660661                smlErrorSet(&local_error, SML_ERROR_GENERIC, 
    661                         "The OBEX server tries to send before a connection with a client was established."); 
     662                        "The OBEX server tries to send before a connection with a client was established or the link was ignored."); 
    662663                goto error; 
    663664        } 
     
    683684         
    684685error: 
     686        smlTrace(TRACE_EXIT_ERROR, "%s: %s", __func__, smlErrorPrint(&local_error)); 
    685687        smlTransportReceiveEvent(linkenv->env->tsp, linkenv->link, SML_TRANSPORT_EVENT_ERROR, NULL, local_error); 
    686         smlTrace(TRACE_EXIT_ERROR, "%s: %s", __func__, smlErrorPrint(&local_error)); 
    687688        smlErrorDeref(&local_error); 
    688689        return;