author | Mikael Hallendal <micke@imendio.com> |
Wed, 08 Oct 2008 13:11:02 +0200 | |
changeset 518 | cdd6a0c5b439 |
parent 516 | 4dd3aa6b83e5 |
child 547 | 692c7753f64e |
permissions | -rw-r--r-- |
516
4dd3aa6b83e5
Change the tab width to 4 steps in the emacs headers
Mikael Hallendal <micke@imendio.com>
parents:
515
diff
changeset
|
1 |
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
2 |
/* |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
3 |
* Copyright (C) 2008 Imendio AB |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
4 |
* |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
6 |
* modify it under the terms of the GNU Lesser General Public License as |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; either version 2 of the |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
8 |
* License, or (at your option) any later version. |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
9 |
* |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
10 |
* This program is distributed in the hope that it will be useful, |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
13 |
* Lesser General Public License for more details. |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
14 |
* |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU Lesser General Public |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
16 |
* License along with this program; if not, write to the |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
17 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
18 |
* Boston, MA 02111-1307, USA. |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
19 |
*/ |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
20 |
|
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
21 |
#include <config.h> |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
22 |
|
463
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
23 |
#include <string.h> |
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
24 |
#include <sys/types.h> |
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
25 |
#include <netdb.h> |
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
26 |
|
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
27 |
/* Needed on Mac OS X */ |
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
28 |
#if HAVE_ARPA_NAMESER_COMPAT_H |
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
29 |
#include <arpa/nameser_compat.h> |
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
30 |
#endif |
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
31 |
|
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
32 |
#include <arpa/nameser.h> |
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
33 |
#include <resolv.h> |
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
34 |
|
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
35 |
#include "lm-marshal.h" |
462
11f85004aa32
Added GMainContext to LmResolver and use lm_misc_add_idle to add an idle in it.
Mikael Hallendal <micke@imendio.com>
parents:
461
diff
changeset
|
36 |
#include "lm-misc.h" |
11f85004aa32
Added GMainContext to LmResolver and use lm_misc_add_idle to add an idle in it.
Mikael Hallendal <micke@imendio.com>
parents:
461
diff
changeset
|
37 |
|
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
38 |
#include "lm-blocking-resolver.h" |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
39 |
|
463
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
40 |
#define SRV_LEN 8192 |
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
41 |
|
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
42 |
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), LM_TYPE_BLOCKING_RESOLVER, LmBlockingResolverPriv)) |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
43 |
|
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
44 |
typedef struct LmBlockingResolverPriv LmBlockingResolverPriv; |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
45 |
struct LmBlockingResolverPriv { |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
46 |
GSource *idle_source; |
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
47 |
}; |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
48 |
|
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
49 |
static void blocking_resolver_finalize (GObject *object); |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
50 |
static void blocking_resolver_lookup (LmResolver *resolver); |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
51 |
static void blocking_resolver_cancel (LmResolver *resolver); |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
52 |
|
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
53 |
G_DEFINE_TYPE (LmBlockingResolver, lm_blocking_resolver, LM_TYPE_RESOLVER) |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
54 |
|
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
55 |
static void |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
56 |
lm_blocking_resolver_class_init (LmBlockingResolverClass *class) |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
57 |
{ |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
58 |
GObjectClass *object_class = G_OBJECT_CLASS (class); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
59 |
LmResolverClass *resolver_class = LM_RESOLVER_CLASS (class); |
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
60 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
61 |
object_class->finalize = blocking_resolver_finalize; |
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
62 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
63 |
resolver_class->lookup = blocking_resolver_lookup; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
64 |
resolver_class->cancel = blocking_resolver_cancel; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
65 |
|
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
66 |
g_type_class_add_private (object_class, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
67 |
sizeof (LmBlockingResolverPriv)); |
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
68 |
} |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
69 |
|
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
70 |
static void |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
71 |
lm_blocking_resolver_init (LmBlockingResolver *blocking_resolver) |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
72 |
{ |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
73 |
LmBlockingResolverPriv *priv; |
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
74 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
75 |
priv = GET_PRIV (blocking_resolver); |
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
76 |
} |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
77 |
|
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
78 |
static void |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
79 |
blocking_resolver_finalize (GObject *object) |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
80 |
{ |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
81 |
LmBlockingResolverPriv *priv; |
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
82 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
83 |
priv = GET_PRIV (object); |
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
84 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
85 |
/* Ensure we don't have an idle around */ |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
86 |
blocking_resolver_cancel (LM_RESOLVER (object)); |
460
4d978afca525
More work on the blocking resolver
Mikael Hallendal <micke@imendio.com>
parents:
459
diff
changeset
|
87 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
88 |
(G_OBJECT_CLASS (lm_blocking_resolver_parent_class)->finalize) (object); |
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
89 |
} |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
90 |
|
461
f7c5f4b5dadd
Added protocol for srv lookups
Mikael Hallendal <micke@imendio.com>
parents:
460
diff
changeset
|
91 |
static void |
f7c5f4b5dadd
Added protocol for srv lookups
Mikael Hallendal <micke@imendio.com>
parents:
460
diff
changeset
|
92 |
blocking_resolver_lookup_host (LmBlockingResolver *resolver) |
f7c5f4b5dadd
Added protocol for srv lookups
Mikael Hallendal <micke@imendio.com>
parents:
460
diff
changeset
|
93 |
{ |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
94 |
gchar *host; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
95 |
struct addrinfo req; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
96 |
struct addrinfo *ans; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
97 |
int err; |
462
11f85004aa32
Added GMainContext to LmResolver and use lm_misc_add_idle to add an idle in it.
Mikael Hallendal <micke@imendio.com>
parents:
461
diff
changeset
|
98 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
99 |
g_object_get (resolver, "host", &host, NULL); |
462
11f85004aa32
Added GMainContext to LmResolver and use lm_misc_add_idle to add an idle in it.
Mikael Hallendal <micke@imendio.com>
parents:
461
diff
changeset
|
100 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
101 |
/* Lookup */ |
462
11f85004aa32
Added GMainContext to LmResolver and use lm_misc_add_idle to add an idle in it.
Mikael Hallendal <micke@imendio.com>
parents:
461
diff
changeset
|
102 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
103 |
memset (&req, 0, sizeof(req)); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
104 |
req.ai_family = AF_UNSPEC; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
105 |
req.ai_socktype = SOCK_STREAM; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
106 |
req.ai_protocol = IPPROTO_TCP; |
463
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
107 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
108 |
err = getaddrinfo (host, NULL, &req, &ans); |
463
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
109 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
110 |
if (err != 0) { |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
111 |
/* FIXME: Report error */ |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
112 |
g_print ("ERROR: %d in %s\n", err, G_STRFUNC); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
113 |
return; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
114 |
} |
463
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
115 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
116 |
if (ans == NULL) { |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
117 |
/* Couldn't find any results */ |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
118 |
/* FIXME: Report no results */ |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
119 |
g_print ("No results in %s\n", G_STRFUNC); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
120 |
} |
463
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
121 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
122 |
/* FIXME: How to set and iterate the results */ |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
123 |
/*priv->results = ans; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
124 |
priv->cur_result = ans; */ |
463
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
125 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
126 |
g_print ("Found result for %s\n", host); |
464
e4e3b9afd58a
Added small test program and simple tests seems to work.
Mikael Hallendal <micke@imendio.com>
parents:
463
diff
changeset
|
127 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
128 |
g_object_ref (resolver); |
477
09fe238533b9
Put a ref on the resolver while calling the callback.
Mikael Hallendal <micke@imendio.com>
parents:
473
diff
changeset
|
129 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
130 |
_lm_resolver_set_result (LM_RESOLVER (resolver), LM_RESOLVER_RESULT_OK, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
131 |
ans); |
467
943afa7cfac5
The blocking dns resolver now works as expected.
Mikael Hallendal <micke@imendio.com>
parents:
464
diff
changeset
|
132 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
133 |
g_object_unref (resolver); |
477
09fe238533b9
Put a ref on the resolver while calling the callback.
Mikael Hallendal <micke@imendio.com>
parents:
473
diff
changeset
|
134 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
135 |
g_free (host); |
461
f7c5f4b5dadd
Added protocol for srv lookups
Mikael Hallendal <micke@imendio.com>
parents:
460
diff
changeset
|
136 |
} |
f7c5f4b5dadd
Added protocol for srv lookups
Mikael Hallendal <micke@imendio.com>
parents:
460
diff
changeset
|
137 |
|
f7c5f4b5dadd
Added protocol for srv lookups
Mikael Hallendal <micke@imendio.com>
parents:
460
diff
changeset
|
138 |
static void |
f7c5f4b5dadd
Added protocol for srv lookups
Mikael Hallendal <micke@imendio.com>
parents:
460
diff
changeset
|
139 |
blocking_resolver_lookup_service (LmBlockingResolver *resolver) |
f7c5f4b5dadd
Added protocol for srv lookups
Mikael Hallendal <micke@imendio.com>
parents:
460
diff
changeset
|
140 |
{ |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
141 |
gchar *domain; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
142 |
gchar *service; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
143 |
gchar *protocol; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
144 |
gchar *srv; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
145 |
gchar *new_server = NULL; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
146 |
guint new_port = 0; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
147 |
gboolean result; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
148 |
unsigned char srv_ans[SRV_LEN]; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
149 |
int len; |
461
f7c5f4b5dadd
Added protocol for srv lookups
Mikael Hallendal <micke@imendio.com>
parents:
460
diff
changeset
|
150 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
151 |
g_object_get (resolver, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
152 |
"domain", &domain, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
153 |
"service", &service, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
154 |
"protocol", &protocol, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
155 |
NULL); |
461
f7c5f4b5dadd
Added protocol for srv lookups
Mikael Hallendal <micke@imendio.com>
parents:
460
diff
changeset
|
156 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
157 |
srv = _lm_resolver_create_srv_string (domain, service, protocol); |
461
f7c5f4b5dadd
Added protocol for srv lookups
Mikael Hallendal <micke@imendio.com>
parents:
460
diff
changeset
|
158 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
159 |
res_init (); |
463
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
160 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
161 |
len = res_query (srv, C_IN, T_SRV, srv_ans, SRV_LEN); |
462
11f85004aa32
Added GMainContext to LmResolver and use lm_misc_add_idle to add an idle in it.
Mikael Hallendal <micke@imendio.com>
parents:
461
diff
changeset
|
162 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
163 |
result = _lm_resolver_parse_srv_response (srv_ans, len, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
164 |
&new_server, &new_port); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
165 |
if (result == FALSE) { |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
166 |
g_print ("Error while parsing srv response in %s\n", |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
167 |
G_STRFUNC); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
168 |
/* FIXME: Report error */ |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
169 |
} |
463
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
170 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
171 |
g_object_set (resolver, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
172 |
"host", new_server, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
173 |
"port", new_port, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
174 |
NULL); |
463
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
175 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
176 |
/* Lookup the new server and the new port */ |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
177 |
blocking_resolver_lookup_host (resolver); |
463
158aebfa7b7c
Moved MIN_PORT and MAX_PORT to lm-internals.h and renamed them.
Mikael Hallendal <micke@imendio.com>
parents:
462
diff
changeset
|
178 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
179 |
g_free (new_server); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
180 |
g_free (srv); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
181 |
g_free (domain); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
182 |
g_free (service); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
183 |
g_free (protocol); |
461
f7c5f4b5dadd
Added protocol for srv lookups
Mikael Hallendal <micke@imendio.com>
parents:
460
diff
changeset
|
184 |
} |
f7c5f4b5dadd
Added protocol for srv lookups
Mikael Hallendal <micke@imendio.com>
parents:
460
diff
changeset
|
185 |
|
459
e6e0a95d108a
Implemented the idle "spawn" in LmBlockingResolver.
Mikael Hallendal <micke@imendio.com>
parents:
458
diff
changeset
|
186 |
static gboolean |
e6e0a95d108a
Implemented the idle "spawn" in LmBlockingResolver.
Mikael Hallendal <micke@imendio.com>
parents:
458
diff
changeset
|
187 |
blocking_resolver_idle_lookup (LmBlockingResolver *resolver) |
e6e0a95d108a
Implemented the idle "spawn" in LmBlockingResolver.
Mikael Hallendal <micke@imendio.com>
parents:
458
diff
changeset
|
188 |
{ |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
189 |
LmBlockingResolverPriv *priv = GET_PRIV (resolver); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
190 |
gint type; |
459
e6e0a95d108a
Implemented the idle "spawn" in LmBlockingResolver.
Mikael Hallendal <micke@imendio.com>
parents:
458
diff
changeset
|
191 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
192 |
/* Start the DNS querying */ |
459
e6e0a95d108a
Implemented the idle "spawn" in LmBlockingResolver.
Mikael Hallendal <micke@imendio.com>
parents:
458
diff
changeset
|
193 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
194 |
/* Decide if we are going to lookup a srv or host */ |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
195 |
g_object_get (resolver, "type", &type, NULL); |
460
4d978afca525
More work on the blocking resolver
Mikael Hallendal <micke@imendio.com>
parents:
459
diff
changeset
|
196 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
197 |
switch (type) { |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
198 |
case LM_RESOLVER_HOST: |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
199 |
blocking_resolver_lookup_host (resolver); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
200 |
break; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
201 |
case LM_RESOLVER_SRV: |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
202 |
blocking_resolver_lookup_service (resolver); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
203 |
break; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
204 |
}; |
460
4d978afca525
More work on the blocking resolver
Mikael Hallendal <micke@imendio.com>
parents:
459
diff
changeset
|
205 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
206 |
/* End of DNS querying */ |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
207 |
priv->idle_source = NULL; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
208 |
return FALSE; |
459
e6e0a95d108a
Implemented the idle "spawn" in LmBlockingResolver.
Mikael Hallendal <micke@imendio.com>
parents:
458
diff
changeset
|
209 |
} |
e6e0a95d108a
Implemented the idle "spawn" in LmBlockingResolver.
Mikael Hallendal <micke@imendio.com>
parents:
458
diff
changeset
|
210 |
|
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
211 |
static void |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
212 |
blocking_resolver_lookup (LmResolver *resolver) |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
213 |
{ |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
214 |
LmBlockingResolverPriv *priv; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
215 |
GMainContext *context; |
459
e6e0a95d108a
Implemented the idle "spawn" in LmBlockingResolver.
Mikael Hallendal <micke@imendio.com>
parents:
458
diff
changeset
|
216 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
217 |
g_return_if_fail (LM_IS_BLOCKING_RESOLVER (resolver)); |
459
e6e0a95d108a
Implemented the idle "spawn" in LmBlockingResolver.
Mikael Hallendal <micke@imendio.com>
parents:
458
diff
changeset
|
218 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
219 |
priv = GET_PRIV (resolver); |
459
e6e0a95d108a
Implemented the idle "spawn" in LmBlockingResolver.
Mikael Hallendal <micke@imendio.com>
parents:
458
diff
changeset
|
220 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
221 |
g_object_get (resolver, "context", &context, NULL); |
462
11f85004aa32
Added GMainContext to LmResolver and use lm_misc_add_idle to add an idle in it.
Mikael Hallendal <micke@imendio.com>
parents:
461
diff
changeset
|
222 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
223 |
priv->idle_source = lm_misc_add_idle (context, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
224 |
(GSourceFunc) blocking_resolver_idle_lookup, |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
225 |
resolver); |
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
226 |
} |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
227 |
|
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
228 |
static void |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
229 |
blocking_resolver_cancel (LmResolver *resolver) |
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
230 |
{ |
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
231 |
LmBlockingResolverPriv *priv; |
459
e6e0a95d108a
Implemented the idle "spawn" in LmBlockingResolver.
Mikael Hallendal <micke@imendio.com>
parents:
458
diff
changeset
|
232 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
233 |
g_return_if_fail (LM_IS_BLOCKING_RESOLVER (resolver)); |
459
e6e0a95d108a
Implemented the idle "spawn" in LmBlockingResolver.
Mikael Hallendal <micke@imendio.com>
parents:
458
diff
changeset
|
234 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
235 |
priv = GET_PRIV (resolver); |
459
e6e0a95d108a
Implemented the idle "spawn" in LmBlockingResolver.
Mikael Hallendal <micke@imendio.com>
parents:
458
diff
changeset
|
236 |
|
518
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
237 |
if (priv->idle_source) { |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
238 |
g_source_destroy (priv->idle_source); |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
239 |
priv->idle_source = NULL; |
cdd6a0c5b439
Went over all of the files and made sure they all were indented the same way.
Mikael Hallendal <micke@imendio.com>
parents:
516
diff
changeset
|
240 |
} |
458
0cd193ceddaa
Added LmBlockingResolver which will handle the case when we do not have libasyncns.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
241 |
} |