Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
414f9e4a
Commit
414f9e4a
authored
Apr 22, 2015
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples: Make them built on non-win32 with GLib < 2.36
parent
d36a42f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
examples/sdp-example.c
examples/sdp-example.c
+5
-2
examples/simple-example.c
examples/simple-example.c
+6
-4
examples/threaded-example.c
examples/threaded-example.c
+5
-1
No files found.
examples/sdp-example.c
View file @
414f9e4a
...
@@ -44,7 +44,9 @@
...
@@ -44,7 +44,9 @@
#include <agent.h>
#include <agent.h>
#if GLIB_CHECK_VERSION(2, 36, 0)
#include <gio/gnetworking.h>
#include <gio/gnetworking.h>
#endif
static
GMainLoop
*
gloop
;
static
GMainLoop
*
gloop
;
static
gchar
*
stun_addr
=
NULL
;
static
gchar
*
stun_addr
=
NULL
;
...
@@ -93,10 +95,11 @@ main(int argc, char *argv[])
...
@@ -93,10 +95,11 @@ main(int argc, char *argv[])
g_debug
(
"Using stun server '[%s]:%u'
\n
"
,
stun_addr
,
stun_port
);
g_debug
(
"Using stun server '[%s]:%u'
\n
"
,
stun_addr
,
stun_port
);
}
}
#if !GLIB_CHECK_VERSION(2, 36, 0)
#if GLIB_CHECK_VERSION(2, 36, 0)
g_networking_init
();
#else
g_type_init
();
g_type_init
();
#endif
#endif
g_networking_init
();
gloop
=
g_main_loop_new
(
NULL
,
FALSE
);
gloop
=
g_main_loop_new
(
NULL
,
FALSE
);
...
...
examples/simple-example.c
View file @
414f9e4a
...
@@ -42,10 +42,11 @@
...
@@ -42,10 +42,11 @@
#include <string.h>
#include <string.h>
#include <ctype.h>
#include <ctype.h>
#include <gio/gnetworking.h>
#include <agent.h>
#include <agent.h>
#if GLIB_CHECK_VERSION(2, 36, 0)
#include <gio/gnetworking.h>
#endif
static
GMainLoop
*
gloop
;
static
GMainLoop
*
gloop
;
static
GIOChannel
*
io_stdin
;
static
GIOChannel
*
io_stdin
;
...
@@ -104,10 +105,11 @@ main(int argc, char *argv[])
...
@@ -104,10 +105,11 @@ main(int argc, char *argv[])
g_debug
(
"Using stun server '[%s]:%u'
\n
"
,
stun_addr
,
stun_port
);
g_debug
(
"Using stun server '[%s]:%u'
\n
"
,
stun_addr
,
stun_port
);
}
}
#if !GLIB_CHECK_VERSION(2, 36, 0)
#if GLIB_CHECK_VERSION(2, 36, 0)
g_networking_init
();
#else
g_type_init
();
g_type_init
();
#endif
#endif
g_networking_init
();
gloop
=
g_main_loop_new
(
NULL
,
FALSE
);
gloop
=
g_main_loop_new
(
NULL
,
FALSE
);
#ifdef G_OS_WIN32
#ifdef G_OS_WIN32
...
...
examples/threaded-example.c
View file @
414f9e4a
...
@@ -44,7 +44,9 @@
...
@@ -44,7 +44,9 @@
#include <agent.h>
#include <agent.h>
#if GLIB_CHECK_VERSION(2, 36, 0)
#include <gio/gnetworking.h>
#include <gio/gnetworking.h>
#endif
static
GMainLoop
*
gloop
;
static
GMainLoop
*
gloop
;
static
gchar
*
stun_addr
=
NULL
;
static
gchar
*
stun_addr
=
NULL
;
...
@@ -102,7 +104,9 @@ main(int argc, char *argv[])
...
@@ -102,7 +104,9 @@ main(int argc, char *argv[])
g_debug
(
"Using stun server '[%s]:%u'
\n
"
,
stun_addr
,
stun_port
);
g_debug
(
"Using stun server '[%s]:%u'
\n
"
,
stun_addr
,
stun_port
);
}
}
#if !GLIB_CHECK_VERSION(2, 36, 0)
#if GLIB_CHECK_VERSION(2, 36, 0)
g_networking_init
();
#else
g_type_init
();
g_type_init
();
#endif
#endif
g_networking_init
();
g_networking_init
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment