~ubuntu-branches/ubuntu/oneiric/strongswan/oneiric

« back to all changes in this revision

Viewing changes to src/charon/sa/connect_manager.c

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayrhofer
  • Date: 2009-04-18 20:28:51 UTC
  • mfrom: (1.1.9 upstream) (2.1.15 karmic)
  • Revision ID: james.westby@ubuntu.com-20090418202851-ep722qhmzvpxh6yj
Tags: 4.3.2-1
Urgency high because of security issue and FTBFS.
* New upstream release, fixes security bug.
* Fix padlock handling for i386 in debian/rules.
  Closes: #525652 (FTBFS on i386)
* Acknowledge NMUs by security team.
  Closes: #533837, #531612
* Add "Conflicts: strongswan (< 4.2.12-1)" to libstrongswan, 
  strongswan-starter, strongswan-ikev1, and strongswan-ikev2 to force
  update of the strongswan package on installation and avoid conflicts
  caused by package restructuring.
  Closes: #526037: strongswan-ikev2 and strongswan: error when trying to 
                   install together
  Closes: #526486: strongswan and libstrongswan: error when trying to 
                   install together
  Closes: #526487: strongswan-ikev1 and strongswan: error when trying to 
                   install together
  Closes: #526488: strongswan-starter and strongswan: error when trying to 
                   install together
* Debconf templates and debian/control reviewed by the debian-l10n-
  english team as part of the Smith review project. Closes: #528073
* Debconf translation updates:
  Closes: #525234: [INTL:ja] Update po-debconf template translation (ja.po) 
  Closes: #528323: [INTL:sv] po-debconf file for strongswan 
  Closes: #528370: [INTL:vi] Vietnamese debconf templates translation update 
  Closes: #529027: [INTL:pt] Updated Portuguese translation for debconf messages
  Closes: #529071: [INTL:fr] French debconf templates translation update 
  Closes: #529592: nb translation of debconf PO for strongSWAN 
  Closes: #529638: [INTL:ru] Russian debconf templates translation 
  Closes: #529661: Updated Czech translation of strongswan debconf messages 
  Closes: #529742: [INTL:eu] strongswan debconf basque translation 
  Closes: #530273: [INTL:fi] Finnish translation of the debconf templates
  Closes: #529063: [INTL:gl] strongswan 4.2.14-2 debconf translation update

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12
12
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13
13
 * for more details.
14
 
 *
15
 
 * $Id: connect_manager.c 4579 2008-11-05 11:29:56Z martin $
16
14
 */
17
15
 
18
16
#include "connect_manager.h"
734
732
 */
735
733
static status_t process_payloads(message_t *message, check_t *check)
736
734
{
737
 
        iterator_t *iterator;
 
735
        enumerator_t *enumerator;
738
736
        payload_t *payload;
739
737
 
740
 
        iterator = message->get_payload_iterator(message);
741
 
        while (iterator->iterate(iterator, (void**)&payload))
 
738
        enumerator = message->create_payload_enumerator(message);
 
739
        while (enumerator->enumerate(enumerator, &payload))
742
740
        {
743
741
                if (payload->get_type(payload) != NOTIFY)
744
742
                {
796
794
                                break;
797
795
                }
798
796
        }
799
 
        iterator->destroy(iterator);
 
797
        enumerator->destroy(enumerator);
800
798
        
801
799
        if (!check->connect_id.ptr || !check->endpoint || !check->auth.ptr)
802
800
        {
904
902
                
905
903
                callback_data_t *data = callback_data_create(this, checklist->connect_id);
906
904
                job_t *job = (job_t*)callback_job_create((callback_job_cb_t)initiator_finish, data, (callback_job_cleanup_t)callback_data_destroy, NULL);
907
 
                charon->scheduler->schedule_job(charon->scheduler, job, ME_WAIT_TO_FINISH);
 
905
                charon->scheduler->schedule_job_ms(charon->scheduler, job, ME_WAIT_TO_FINISH);
908
906
                checklist->is_finishing = TRUE;
909
907
        }
910
908
        
1002
1000
        }
1003
1001
        DBG2(DBG_IKE, "scheduling retransmission %d of pair '%d' in %dms", retransmission, pair->id, rto);
1004
1002
        
1005
 
        charon->scheduler->schedule_job(charon->scheduler, (job_t*)job, rto);
 
1003
        charon->scheduler->schedule_job_ms(charon->scheduler, (job_t*)job, rto);
1006
1004
}
1007
1005
 
1008
1006
/**
1139
1137
{
1140
1138
        callback_data_t *data = callback_data_create(this, checklist->connect_id);
1141
1139
        checklist->sender = (job_t*)callback_job_create((callback_job_cb_t)sender, data, (callback_job_cleanup_t)callback_data_destroy, NULL);
1142
 
        charon->scheduler->schedule_job(charon->scheduler, checklist->sender, time);
 
1140
        charon->scheduler->schedule_job_ms(charon->scheduler, checklist->sender, time);
1143
1141
}
1144
1142
 
1145
1143
/**
1196
1194
                }
1197
1195
                else
1198
1196
                {
1199
 
                        DBG1(DBG_IKE, "there is no mediated connection waiting between '%D' "
1200
 
                                        "and '%D'", checklist->initiator.id, checklist->responder.id);
 
1197
                        DBG1(DBG_IKE, "there is no mediated connection waiting between '%Y' "
 
1198
                                        "and '%Y'", checklist->initiator.id, checklist->responder.id);
1201
1199
                }
1202
1200
        }
1203
1201
}
1396
1394
 
1397
1395
        if (get_initiated_by_ids(this, id, peer_id, &initiated) != SUCCESS)
1398
1396
        {
1399
 
                DBG2(DBG_IKE, "registered waiting mediated connection with '%D'", peer_id);
 
1397
                DBG2(DBG_IKE, "registered waiting mediated connection with '%Y'", peer_id);
1400
1398
                initiated = initiated_create(id, peer_id);
1401
1399
                this->initiated->insert_last(this->initiated, initiated);
1402
1400
                already_there = FALSE;
1425
1423
 
1426
1424
        if (get_initiated_by_ids(this, id, peer_id, &initiated) != SUCCESS)
1427
1425
        {
1428
 
                DBG2(DBG_IKE, "no waiting mediated connections with '%D'", peer_id);
 
1426
                DBG2(DBG_IKE, "no waiting mediated connections with '%Y'", peer_id);
1429
1427
                this->mutex->unlock(this->mutex);
1430
1428
                return;
1431
1429
        }