~ubuntu-branches/ubuntu/trusty/libimobiledevice/trusty-proposed

« back to all changes in this revision

Viewing changes to dev/afccheck.c

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki, Matthias Niess, Timo Jyrinki
  • Date: 2014-03-14 08:44:15 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20140314084415-twglhjx6bqzmir8v
Tags: 1.1.5+git20140313.bafe6a9e-0ubuntu1
[ Matthias Niess ]
* Replace a duplicate 'backup' util man page with the one for 'crashreport'

[ Timo Jyrinki ]
* New upstream snapshot. (LP: #1207812)
* Drop patches include in the upstream snapshot:
  - debian/patches/CVE-2013-2142.patch
  - debian/patches/git_explicitly_cast_ssl_enabled.patch
* Drop the python patch, new upstream method seems to work:
  - debian/patches/09_use_python_config.patch
* Refreshed remaining patches:
  - debian/patches/01-libs.private.patch
  - debian/patches/02-fix-link-errors.patch
* Drop libimobiledevice-doc, the git does not include html documentation
* Updated libimobiledevice4.symbols 
* Add missing man page for the 'idevicename' util

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <stdlib.h>
23
23
#include <stdio.h>
24
24
#include <string.h>
25
 
#include <pthread.h>
26
25
 
27
26
#include <libimobiledevice/libimobiledevice.h>
28
27
#include <libimobiledevice/lockdown.h>
29
28
#include <libimobiledevice/afc.h>
 
29
#include "common/thread.h"
30
30
 
31
31
#define BUFFER_SIZE 20000
32
32
#define NB_THREADS 10
85
85
 
86
86
        //cleanup
87
87
        afc_remove_path(((param *) data)->afc, path);
88
 
        pthread_exit(0);
 
88
        return NULL;
89
89
}
90
90
 
91
91
int main(int argc, char *argv[])
125
125
                service = NULL;
126
126
        }
127
127
 
128
 
        pthread_t threads[NB_THREADS];
 
128
        thread_t threads[NB_THREADS];
129
129
        param data[NB_THREADS];
130
130
 
131
131
        int i = 0;
132
132
        for (i = 0; i < NB_THREADS; i++) {
133
133
                data[i].afc = afc;
134
134
                data[i].id = i + 1;
135
 
                pthread_create(&threads[i], NULL, check_afc, data + i);
 
135
                thread_create(&threads[i], check_afc, data + i);
136
136
        }
137
137
 
138
138
        for (i = 0; i < NB_THREADS; i++) {
139
 
                pthread_join(threads[i], NULL);
 
139
                thread_join(threads[i]);
140
140
        }
141
141
 
142
142
        lockdownd_client_free(client);