Ignore:
Timestamp:
2008-07-22T12:37:49Z (15 years ago)
Author:
ulim <a.sporto+bee@…>
Branches:
master
Children:
4ac647d
Parents:
9afeefa
Message:

Added an account setting 'proxy'.

Note that this is only used for sending. The default <local>;<auto> means let
the receiver try a direct connection first and then the proxy discovered from
the server (if any). If you know you're firewalled you can remove the <local>.
If you want to provide your own proxy try something like
"<local>;JID,HOST,PORT". E.g.
"<local>;proxy.somewhere.org,123.123.123.123,7777".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/si.c

    r9afeefa r8a90001  
    3939        jd->filetransfers = g_slist_remove( jd->filetransfers, tf );
    4040
    41         if( tf->fd )
     41        if( tf->fd != -1 )
    4242        {
    4343                close( tf->fd );
    44                 tf->fd = 0;
     44                tf->fd = -1;
    4545        }
    4646
     
    129129
    130130        if( tf->bud->features && jd->have_streamhosts==1 ) {
     131                tf->disco_timeout = 0;
    131132                jabber_si_transfer_start( tf );
    132                 tf->disco_timeout = 0;
    133133                return FALSE;
    134134        }
     
    139139       
    140140        if( !tf->bud->features && jd->have_streamhosts!=1 )
    141                 imcb_file_canceled( tf->ft, "Couldn't get buddy's features or the server's" );
     141                imcb_log( tf->ic, "Couldn't get buddy's features nor discover all services of the server" );
    142142        else if( !tf->bud->features )
    143                 imcb_file_canceled( tf->ft, "Couldn't get buddy's features" );
     143                imcb_log( tf->ic, "Couldn't get buddy's features" );
    144144        else
    145                 imcb_file_canceled( tf->ft, "Couldn't get server's features" );
     145                imcb_log( tf->ic, "Couldn't discover some of the server's services" );
    146146       
    147147        tf->disco_timeout = 0;
     148        jabber_si_transfer_start( tf );
    148149        return FALSE;
    149150}
     
    173174        tf->ic = ic;
    174175        tf->ft = ft;
     176        tf->fd = -1;
    175177        tf->ft->data = tf;
    176178        tf->ft->free = jabber_si_free_transfer;
     
    186188                jabber_iq_query_features( ic, bud->full_jid );
    187189
    188         if( jd->have_streamhosts!=1 ) {
     190        /* If <auto> is not set don't check for proxies */
     191        if( ( jd->have_streamhosts!=1 ) && ( jd->streamhosts==NULL ) &&
     192            ( strstr( set_getstr( &ic->acc->set, "proxy" ), "<auto>" ) != NULL ) ) {
    189193                jd->have_streamhosts = 0;
    190194                jabber_iq_query_server( ic, server, XMLNS_DISCO_ITEMS );
    191         }
     195        } else if ( jd->streamhosts!=NULL )
     196                jd->have_streamhosts = 1;
    192197
    193198        /* if we had to do a query, wait for the result.
     
    309314        tf->ic = ic;
    310315        tf->ft = ft;
     316        tf->fd = -1;
    311317        tf->ft->data = tf;
    312318        tf->ft->accept = jabber_si_answer_request;
Note: See TracChangeset for help on using the changeset viewer.